summaryrefslogtreecommitdiffstats
path: root/after/ftplugin/php.vim
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2013-09-12 16:33:12 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2013-09-12 16:33:12 +0200
commitd96dc724d442bbc9788815ab3da09d9fff0555a9 (patch)
treef4b1859aa45a28cd420c7285006a4398726ff18a /after/ftplugin/php.vim
parentd4eca3f2eb6c8496261ed252596d6813b9eb8a04 (diff)
downloadvim-polyglot-d96dc724d442bbc9788815ab3da09d9fff0555a9.tar.gz
vim-polyglot-d96dc724d442bbc9788815ab3da09d9fff0555a9.zip
Add extended php support
Diffstat (limited to 'after/ftplugin/php.vim')
-rw-r--r--after/ftplugin/php.vim24
1 files changed, 24 insertions, 0 deletions
diff --git a/after/ftplugin/php.vim b/after/ftplugin/php.vim
new file mode 100644
index 00000000..dc42280f
--- /dev/null
+++ b/after/ftplugin/php.vim
@@ -0,0 +1,24 @@
+
+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