Gentoo Archives: gentoo-commits

From: Patrice Clement <monsieurp@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-editors/vim-core/files/
Date: Sun, 22 Oct 2017 14:25:51
Message-Id: 1508682342.cc69009cc7aef4420b844bc199abfe5285b6e0d4.monsieurp@gentoo
1 commit: cc69009cc7aef4420b844bc199abfe5285b6e0d4
2 Author: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
3 AuthorDate: Sun Oct 22 14:03:05 2017 +0000
4 Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 22 14:25:42 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc69009c
7
8 app-editors/vim-core: enable omni completion based on syntax files.
9
10 Closes: https://bugs.gentoo.org/330187
11
12 Courtesy of Florian Crouzat <gentoo <AT> floriancrouzat.net>
13
14 Package-Manager: Portage-2.3.8, Repoman-2.3.3
15
16 app-editors/vim-core/files/vimrc-r5 | 11 +++++++++++
17 1 file changed, 11 insertions(+)
18
19 diff --git a/app-editors/vim-core/files/vimrc-r5 b/app-editors/vim-core/files/vimrc-r5
20 index 3386b6c54ba..5d8c9d5b0f1 100644
21 --- a/app-editors/vim-core/files/vimrc-r5
22 +++ b/app-editors/vim-core/files/vimrc-r5
23 @@ -199,5 +199,16 @@ if filereadable("@GENTOO_PORTAGE_EPREFIX@/etc/vim/vimrc.local")
24 endif
25 " }}}
26
27 +" Enable Omni completion when opening a file only if a specific plugin does
28 +" not already exist for that filetype. This allows Omni completion
29 +" (Ctrl-x/Ctrl-o) to work with any programming language if and only if a syntax
30 +" file exists for the said language.
31 +if exists("+omnifunc")
32 + autocmd Filetype *
33 + \ if &omnifunc == "" |
34 + \ setlocal omnifunc=syntaxcomplete#Complete |
35 + \ endif
36 +endif
37 +
38 " vim: set fenc=utf-8 tw=80 sw=2 sts=2 et foldmethod=marker :