]> ruderich.org/simon Gitweb - config/dotfiles.git/blobdiff - vimrc
vimrc: Enable folding for Vim and XML.
[config/dotfiles.git] / vimrc
diff --git a/vimrc b/vimrc
index bb0bfe6ce268e5722210a7f383fb0e51e559c5ec..75283da711ca796f02b4ee243951c7b70afb1dee 100644 (file)
--- a/vimrc
+++ b/vimrc
@@ -404,6 +404,15 @@ if has('syntax')
         set synmaxcol=500
     endif
 
+" Use (limited) syntax based omni completion if no other omni completion is
+" available. Taken from :help ft-syntax-omni.
+    if has('autocmd') && exists('+omnifunc')
+        autocmd FileType *
+            \ if &omnifunc == '' |
+            \     setlocal omnifunc=syntaxcomplete#Complete |
+            \ endif
+    endif
+
 " Highlight lines longer than 78 characters. Thanks to Tony Mechelynck
 " <antoine.mechelynck@gmail.com> from the Vim mailing list. It can easily be
 " disabled when necessary with :2match (in Vim >= 700).
@@ -440,6 +449,10 @@ if has('syntax')
     let g:perl_fold_blocks = 1
     let g:perl_nofold_packages = 1
     let g:perl_include_pod = 1 " syntax coloring for PODs
+    " Vim, enable folding for autogroups (a) and functions (f).
+    let g:vimsyn_folding = "af"
+    " XML.
+    let g:xml_syntax_folding = 1
 endif