blob: 9e4b15b20b540a42ecb8cfdb416437e3386d0119 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
vimrc.after_ftplugin('php', function(conf)
-- 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)
|