summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-editors/vim-core')
-rw-r--r--app-editors/vim-core/files/vimrc-r511
1 files changed, 11 insertions, 0 deletions
diff --git a/app-editors/vim-core/files/vimrc-r5 b/app-editors/vim-core/files/vimrc-r5
index 3386b6c54ba0..5d8c9d5b0f1f 100644
--- a/app-editors/vim-core/files/vimrc-r5
+++ b/app-editors/vim-core/files/vimrc-r5
@@ -199,5 +199,16 @@ if filereadable("@GENTOO_PORTAGE_EPREFIX@/etc/vim/vimrc.local")
endif
" }}}
+" Enable Omni completion when opening a file only if a specific plugin does
+" not already exist for that filetype. This allows Omni completion
+" (Ctrl-x/Ctrl-o) to work with any programming language if and only if a syntax
+" file exists for the said language.
+if exists("+omnifunc")
+ autocmd Filetype *
+ \ if &omnifunc == "" |
+ \ setlocal omnifunc=syntaxcomplete#Complete |
+ \ endif
+endif
+
" vim: set fenc=utf-8 tw=80 sw=2 sts=2 et foldmethod=marker :