From 86881d01dd10b51ce4de544bec2faec4abf0a5e4 Mon Sep 17 00:00:00 2001 From: meh Date: Wed, 13 Feb 2013 14:18:27 +0100 Subject: [PATCH] Improve default semantic triggers --- README.md | 9 ++++++--- plugin/youcompleteme.vim | 7 +++++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 4259eb63..8313b65d 100644 --- a/README.md +++ b/README.md @@ -647,11 +647,14 @@ listed as a trigger, the same thing would happen when the user typed `foo->`. Default: `[see next line]` let g:ycm_semantic_triggers = { - \ 'c,cpp,objc,objcpp' : ['->', '.', '::'], + \ 'c' : ['->', '.'], + \ 'objc' : ['->', '.'], + \ 'cpp,objcpp' : ['->', '.', '::'], \ 'perl,php' : ['->'], - \ 'cs,java,javascript,d,vim,ruby,python,perl6,scala,vb' : ['.'], + \ 'cs,java,javascript,d,vim,ruby,python,perl6,scala,vb,elixir' : ['.'], \ 'lua' : ['.', ':'], - } + \ 'erlang' : [':'], + } FAQ --- diff --git a/plugin/youcompleteme.vim b/plugin/youcompleteme.vim index 0332e79c..6eadd5cc 100644 --- a/plugin/youcompleteme.vim +++ b/plugin/youcompleteme.vim @@ -97,10 +97,13 @@ let g:ycm_global_ycm_extra_conf = let g:ycm_semantic_triggers = \ get( g:, 'ycm_semantic_triggers', { - \ 'c,cpp,objc,objcpp' : ['->', '.', '::'], + \ 'c' : ['->', '.'], + \ 'objc' : ['->', '.'], + \ 'cpp,objcpp' : ['->', '.', '::'], \ 'perl,php' : ['->'], - \ 'cs,java,javascript,d,vim,ruby,python,perl6,scala,vb' : ['.'], + \ 'cs,java,javascript,d,vim,ruby,python,perl6,scala,vb,elixir' : ['.'], \ 'lua' : ['.', ':'], + \ 'erlang' : [':'], \ } ) " On-demand loading. Let's use the autoload folder and not slow down vim's