diff options
author | Patrice Clement <monsieurp@gentoo.org> | 2017-10-22 16:03:05 +0200 |
---|---|---|
committer | Patrice Clement <monsieurp@gentoo.org> | 2017-10-22 16:25:42 +0200 |
commit | cc69009cc7aef4420b844bc199abfe5285b6e0d4 (patch) | |
tree | 6faaaa81dedc63c1dc832484aeaafb58d3cf50ab /app-editors | |
parent | base/use.mask: Mask postgres_compat_postgres9_2 useflag (diff) | |
download | gentoo-cc69009cc7aef4420b844bc199abfe5285b6e0d4.tar.gz gentoo-cc69009cc7aef4420b844bc199abfe5285b6e0d4.tar.bz2 gentoo-cc69009cc7aef4420b844bc199abfe5285b6e0d4.zip |
app-editors/vim-core: enable omni completion based on syntax files.
Closes: https://bugs.gentoo.org/330187
Courtesy of Florian Crouzat <gentoo@floriancrouzat.net>
Package-Manager: Portage-2.3.8, Repoman-2.3.3
Diffstat (limited to 'app-editors')
-rw-r--r-- | app-editors/vim-core/files/vimrc-r5 | 11 |
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 : |