blob: 8c03f57abfcd11ce2e04d4c04eceb6426d7c6537 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
vimrc.after_ftplugin('php', function(conf)
conf.indent(conf.SPACE, 2)
-- If a buffer is empty, insert `<?php` tag and 2 blank lines, and position the
-- cursor at the end of the buffer (line 3, column 0).
--
-- Example:
-- <?php
--
-- [cursor]
if vim.fn.line('$') == 1 and vim.fn.getline(1) == '' then
vim.fn.setline(1, { '<?php', '', '' })
vim.fn.cursor(3, 0)
end
end)
|