Shougo / neocomplcache.vim

Ultimate auto-completion system for Vim.
http://www.vim.org/scripts/script.php?script_id=2620
1.72k stars 135 forks source link

completion of underbar not working #434

Closed cpfaff closed 11 years ago

cpfaff commented 11 years ago

He

I am not quite sure why it is not working. I set it in my options to be enabled. It worked once but now not longer. Maybe my options are the problem. My options are below:

         let g:neocomplcache_enable_at_startup = 1 
         let g:neocomplcache_temporary_dir = '~/.vim/tmp/'
         let g:neocomplcache_enable_camel_case_completion = 1
         let g:neocomplcache_enable_underbar_completion = 1
         let g:neocomplcache_enable_smart_case = 1
         let g:neocomplcache_min_syntax_length = 3
         let g:neocomplcache_enable_auto_delimiter = 1
         let g:neocomplcache_max_list = 15
         let g:neocomplcache_auto_completion_start_length = 3
         let g:neocomplcache_force_overwrite_completefunc = 1
         let g:neocomplcache_enable_auto_select = 1

         let g:neosnippet#snippets_directory='~/.vim/snippets/'

         " Define keyword.
         if !exists('g:neocomplcache_keyword_patterns')
            let g:neocomplcache_keyword_patterns = {}
         endif

         let g:neocomplcache_keyword_patterns['default'] = '\h\w*'

         " Enable omni completion.
         augroup neocomplcache_omni_completion
            autocmd!
            autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS
            autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags
            autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS
            autocmd FileType python setlocal omnifunc=pythoncomplete#Complete
            autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags
            autocmd FileType ruby setlocal omnifunc=rubycomplete#Complete
         augroup END

         " Enable heavy omni completion.
         if !exists('g:neocomplcache_omni_patterns')
            let g:neocomplcache_omni_patterns = {}
         endif

         let g:neocomplcache_omni_patterns.ruby = '[^. *\t]\.\h\w*\|\h\w*::'
         let g:neocomplcache_omni_patterns.php = '[^. \t]->\h\w*\|\h\w*::'
         let g:neocomplcache_omni_patterns.c = '\%(\.\|->\)\h\w*'
         let g:neocomplcache_omni_patterns.cpp = '\h\w*\%(\.\|->\)\h\w*\|\h\w*::'
cpfaff commented 11 years ago

I had a bit time to test it and I have to be more precise. It is not working in my LaTeX, R-Noweb files. But works nice in a simple text file.

cpfaff commented 11 years ago

Further testing tells me that completion is only not working (at all, not only underbar) if I open a file with unite file candidates. Then it is even not working for text files. If I open the any file via commandline it is working even for the R-Noweb and LaTeX files. And if I open it via :tabe file it also works nicely. So the bug might be unite related.

Shougo commented 11 years ago

This issue is happened in neoocomplete.vim? I don't want to modify neocomplcache. It is old and slow.

cpfaff commented 11 years ago

I see. This happens when using neocomplcache. I would switch to neocomplete but waiting for two things: First, your announcement that it is usable in production (but good to hear that the new completion system is in focus now). Second, vim in according patch level to be offered in my distribution (Ubuntu 13.04). As the first condition might be met already, the second will be when ubuntu 13.10 is released I think. I could also compile the latest patchlevel version which I tried but then syntax highlighting did not work anymore. So I just have to figure out how to build "my" own vim, setting the right flags on configure. How do you compile your vim, if you do (just the step of ./configure)?

Shougo commented 11 years ago

First, your announcement that it is usable in production (but good to hear that the new completion system is in focus now).

The announcement is already exists.

In neocomplcache documentation:

If you use Vim 7.3.885 or above with if_lua feature, you should use neocomplete. It is faster than neocomplcache.

https://github.com/Shougo/neocomplete.vim
Shougo commented 11 years ago

So I just have to figure out how to build "my" own vim, setting the right flags on configure. How do you compile your vim, if you do (just the step of ./configure)?

Hmm.. But I think it is not my work.

cpfaff commented 11 years ago

No it is not your work to provide the right version thats right. I was telling what I am waiting for and asking you how you compile because your biuld config works good with your plugins and I use a lot of them. Meanwhile I found a way to build my vim the same way as the ubuntu maintainer does. And all works, thanks.

Shougo commented 11 years ago

OK. My current vim build script is in this:

https://github.com/Shougo/shougo-s-github/blob/master/build-vim.sh

cpfaff commented 11 years ago

Thanks