Wednesday, November 7, 2012

question about neocomplcache

Hi

         I use neocomplcache.vim to complete my sources.

 

         It support camel case completion.

 

         If there is AxxBxxCxx, you can type AB,it will pop AxxBxxCxx.

 

         But I want to type ABC, then it pop AxxBxxCxx, because perhaps there are AxxBxxCxx, AxxBxxDxx, AxxBxxExx , AxxBxxFxx.

 

         In neocomplcache sripts, I found some source about this function,but I can't understand complex regular expression!

 

    " Camel case completion."{{{

    if g:neocomplcache_enable_camel_case_completion

          \ && keyword_escape =~ '\u'

      let keyword_escape = substitute(keyword_escape, '\u\?\zs\U*',

            \ '\\%(\0\\l*\\|\U\0\E\\u*_\\?\\)', 'g')

    endif

"}}}

 

 

I hope someone can help me solve this question!

Thanks a lot!

 

Best regard!

No comments: