Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

neocomplcache neocomplcache#complete_common_string() works weird with phpcomplete #43

Closed
markwu opened this issue Oct 6, 2010 · 6 comments

Comments

@markwu
Copy link

markwu commented Oct 6, 2010

HI Shougo:

Thanks, for this plugin, I love it. It works very well in my vim, except:

  1. neocomplcache#complete_common_string() not works with phpcomplete
  2. lacks of some build-in function name with with phpcomplete
    The phpcomplete.vim comes from http://www.vim.org/scripts/script.php?script_id=3171

For 1st issue. The complete_common_string does not bring me the whole line include variables of the keyword, it just the keyword it self. For example, when I type phpin and press , it complete the whole line "phpinfo([int what] | bool", but in neocomplcache, I only see "phpinfo".

For 2nd issue. It seems the neocomplcache does not get the whole build-in function name from phpcomplete, for example, the Memcache::XXX exist in phpcomplete but does not exist in ~./neocon/syntax_cache/php. Therefore, I can't complete MemcXXX, it just found nothing.

It is a bug? or my configuration error? Please kindly let me know how to fix this. Thanks!

=== Here comes from my necomplcache settings in .vimrc ===

let g:neocomplcache_enable_at_startup = 1
let g:neocomplcache_enable_smart_case = 1
let g:neocomplcache_enable_camel_case_completion = 1
let g:neocomplcache_enable_underbar_completion = 1
let g:neocomplcache_min_syntax_length = 3
let g:neocomplcache_enable_auto_select = 1

" Define keyword
if !exists('g:neocomplcache_keyword_patterns')
let g:neocomplcache_keyword_patterns = {}
endif
let g:neocomplcache_keyword_patterns['default'] = '\h\w*'

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

" Key mappings
inoremap neocomplcache#complete_common_string()
imap neocomplcache#sources#snippets_complete#expandable() ? "(neocomplcache_snippets_expand)" : pumvisible() ? "" : ""

@Shougo
Copy link
Owner

Shougo commented Oct 6, 2010

  1. neocomplcache#complete_common_string() not works with phpcomplete
    For 1st issue. The complete_common_string does not bring me the whole line include variables of the keyword, it just the keyword it self.

neocomplcache#complete_common_string() is NOT whole line completion like . Please execute ':help neocomplcache#complete_common_string()'.

  1. lacks of some build-in function name with with phpcomplete

PHP omni completion is too slow.
So I disabled PHP omni function by default.
Please set neocomplcache_omni_pattens['php'].
Like this:
let g:neocomplcache_omni_patterns['php']= '[^. \t]->\h\w_|\h\w_::'

@markwu
Copy link
Author

markwu commented Oct 6, 2010

Hi Shougo:

For 1st issue, I just make misunderstanding :( , thanks for correcting me.

For 2nd Issue, I follow your settings list above, it works well when I type "memcache::" and neocomplcache popup a dialog for me to complete the class method and functions. But, I still can not complete the class name, if I type only 'mem' to get the whole class name 'memcache', I just get a function 'memory_get_usage'. The class name 'memcache' does exist in phpcomplete build-in functions, but not exist in ~./neocon/syntax_cache/php.

Thanks,
Regards, Mark

@Shougo
Copy link
Owner

Shougo commented Oct 7, 2010

Please set this. But too slow....
let g:neocomplcache_omni_patterns['php']= '[. \t]->\h\w|\h\w*'

@markwu
Copy link
Author

markwu commented Oct 7, 2010

I see, now I know what you mean. It is really slow :(
That's why you use syntax keyword to replace omni phpcomplete.

Sorry, One more questions, If I already has a tags file for my whole project files generated by ctags. Can I incorporate it into neocomplcache to get it complete according my tags file?

Thanks,

Regards, Mark

@Shougo
Copy link
Owner

Shougo commented Oct 7, 2010

Please execute :NeoComplCacheCachingTags.
neocomplcache don't caching automatically.
Because tags_complete's caching is slow.

@markwu
Copy link
Author

markwu commented Oct 7, 2010

Hi Shougo:

Thanks for your great help, you just solve all my issues. Now, the neocomplcache plugin works very well in my development env.

Thanks,

Regards, Mark

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants