vim-polyglot/after/ftplugin/php.vim
2013-09-12 16:33:12 +02:00

25 lines
809 B
VimL

if !exists("g:DisableAutoPHPFolding")
let g:DisableAutoPHPFolding = 0
endif
if !g:DisableAutoPHPFolding
" Don't use the PHP syntax folding
setlocal foldmethod=manual
" Turn on PHP fast folds
EnableFastPHPFolds
endif
" Fix matchpairs for PHP (for matchit.vim plugin)
if exists("loaded_matchit")
let b:match_skip = 's:comment\|string'
let b:match_words = '<?\(php\)\?:?>,\<switch\>:\<endswitch\>,' .
\ '\<if\>:\<elseif\>:\<else\>:\<endif\>,' .
\ '\<while\>:\<endwhile\>,\<do\>:\<while\>,' .
\ '\<for\>:\<endfor\>,\<foreach\>:\<endforeach\>' .
\ '<\@<=[ou]l\>[^>]*\%(>\|$\):<\@<=li\>:<\@<=/[ou]l>,' .
\ '<\@<=dl\>[^>]*\%(>\|$\):<\@<=d[td]\>:<\@<=/dl>,' .
\ '<\@<=\([^/?][^ \t>]*\)[^>]*\%(>\|$\):<\@<=/\1>,' .
\ '<:>,(:),{:},[:]'
endif