aboutsummaryrefslogtreecommitdiffhomepage
path: root/.vim/my/after/ftplugin/php.vim
blob: ec7fd3edda85151d77ebf9f7168e2187b61024a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
scriptencoding utf-8


if exists('b:did_ftplugin_php_after')
    finish
endif



FtpluginSetLocal expandtab
FtpluginSetLocal shiftwidth=2
FtpluginSetLocal softtabstop=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 line('$') ==# 1 && empty(getline(1))
    call setline(1, ['<?php', '', ''])
    call cursor(3, 0)
endif



let b:did_ftplugin_php_after = 1