help neocomplcache with perl

Wed, 09 Sep 2015 14:55:08 -0400

author
Meredith Howard <mhoward@roomag.org>
date
Wed, 09 Sep 2015 14:55:08 -0400
changeset 205
71ae71f96ad7
parent 204
f6a2f233a33b
child 206
0f6e9962f2b4

help neocomplcache with perl

.vimrc file | annotate | diff | comparison | revisions
--- a/.vimrc
+++ b/.vimrc
@@ -402,8 +402,16 @@ endif
 
 "Required to get ruby omni
 let g:neocomplcache_omni_patterns.ruby = '[^. *\t]\.\w*\|\h\w*::'
-"Enabling the below allows module completion from CPAN, jeez
-" let g:neocomplcache_omni_patterns.perl = '\h\w*->\h\w*\|\h\w*::'
+" allow module completion from CPAN when combined with perlomni
+"let g:neocomplcache_omni_patterns.perl = '[^. \t]->\%(\h\w*\)\?\|\h\w*::\%(\h\w*\)\?'
+" seems like overkill
+
+if !exists('g:neocomplcache_filename_include_exprs')
+  let g:neocomplcache_filename_include_exprs = {}
+endif
+
+"help scan into "use" statements
+let g:neocomplcache_filename_include_exprs.perl = 'fnamemodify(substitute(v:fname, "/", "::", "g"), ":r")'
 
 " }}}
 

mercurial