commit: cc69009cc7aef4420b844bc199abfe5285b6e0d4 Author: Patrice Clement <monsieurp <AT> gentoo <DOT> org> AuthorDate: Sun Oct 22 14:03:05 2017 +0000 Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org> CommitDate: Sun Oct 22 14:25:42 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc69009c
app-editors/vim-core: enable omni completion based on syntax files. Closes: https://bugs.gentoo.org/330187 Courtesy of Florian Crouzat <gentoo <AT> floriancrouzat.net> Package-Manager: Portage-2.3.8, Repoman-2.3.3 app-editors/vim-core/files/vimrc-r5 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app-editors/vim-core/files/vimrc-r5 b/app-editors/vim-core/files/vimrc-r5 index 3386b6c54ba..5d8c9d5b0f1 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 :
