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

neocomplcache ver.8.1(neocomplete) milestone #393

Closed Shougo closed 11 years ago

Shougo commented 11 years ago

I will develop neocomplcache ver.8.1 after ver.8.0.

Note: Unfortunately, in neocomplcache ver.8.1 wildcard and camel case completion and underbar completion features are disabled. But you can use real fuzzy matcher if if_lua is enabled in your Vim. Note: If your Vim is not enabled if_lua or too old, neocomplcache completion speed will slow(than before version).

I recommend for you to enable if_lua in your Vim!

Shougo commented 11 years ago

I may change plugin name because neocomplcache ver.8.1 has many restriction....

zhaocai commented 11 years ago

:+1:

Shougo commented 11 years ago

I think I will change the name to neocomplete(neo-complete).

1: neocomplete breaks backward compatibility from neocomplcache. 2: neocomplete may not stable version. 3: It is hard to understand the name "neocomplcache". 4: You can manage neocomplcache and neocomplete easily by neobundle and other package management system. 5: I can refactor internal interface than ver.8.0 6: I can change source names(Example: buffer_complete -> buffer) 7: You can use neocomplcache if you are using old Vim or if_lua is not enabled.

zhaocai commented 11 years ago

neocomplcache is quite famous. Is it really necessary to change the name?

If you change the name, are you going to rename all the option variables, function names, etc. ? And how about all the extensions people write for neocomplcache?

Shougo commented 11 years ago

neocomplcache is quite famous. Is it really necessary to change the name?

If you change the name, are you going to rename all the option variables, function names, etc. ?

Yes.

To use neocomplcache ver.8.1, you must enable if_lua interface. I think this is big change. And neocomplcache has legacy interfaces.

And how about all the extensions people write for neocomplcache?

Yes. But neocomplcache(neocomplete) extension specifications are documented instead of older versions. And neocomplete extension has compatibility with neocomplcache ver.8.0 sources.

UncleBill commented 11 years ago

:+1: for you great job! Really hope vim support fuzzy match natively

Shougo commented 11 years ago

Well, I will test next version in ver.8.1.

zhaocai commented 11 years ago

how is the progress :question:

Shougo commented 11 years ago

I must release neocomplcache ver.8.0 before developing ver.8.1.

Shougo commented 11 years ago

I started neocomplcache ver.8.1 development.

https://github.com/Shougo/neocomplcache/tree/ver.8.1

weynhamz commented 11 years ago

+1 for changing the name to neocomplete, it's better.

Shougo commented 11 years ago

Thanks.

weynhamz commented 11 years ago

@Shougo I suggest that open a new repository called neocomplete, move this milestone as well as branch v8.1 to that repository, make the HEAD of this repository stay at current master and version only for bugfixes. These bugfixes should also be merged into v8.1 branch in the new repostory of course. This way, we can began to migrate our configurations for this renaming.

Shougo commented 11 years ago

No. It is not time for it.

I will rename after implementing matcher and if_lua features.

Shougo commented 11 years ago

I implemented matchers experimental. In buffer_complete, new matchers are used.

Note: You must enable if_lua interface in ver.8.1.

Shougo commented 11 years ago

I implemented matcher_fuzzy in experimental You can use real fuzzy completion by enabling g:neocomplcache_enable_fuzzy_completion.

Shougo commented 11 years ago

Current progress:

Shougo commented 11 years ago

I created neocomplete.vim repository. But not pushed.

https://github.com/Shougo/neocomplete.vim

weynhamz commented 11 years ago

Wow, that is really quick.

weynhamz commented 11 years ago

@Shougo How do you make github redirect https://github.com/Shougo/neocomplete to https://github.com/Shougo/neocomplete.vim?

Shougo commented 11 years ago

Wow, that is really quick.

:-)

@Shougo How do you make github redirect https://github.com/Shougo/neocomplete to https://github.com/Shougo/neocomplete.vim?

How I set github redirect? I don't know it...

weynhamz commented 11 years ago

@Shougo How do you make github redirect https://github.com/Shougo/neocomplete to https://github.com/Shougo/neocomplete.vim?

How I set github redirect? I don't know it...

From what I know, github does not do redirect for renamed repo? Did create neocomplete first, and then rename it to neocomplete.vim?

Shougo commented 11 years ago

Did create neocomplete first, and then rename it to neocomplete.vim?

Yes.

From what I know, github does not do redirect for renamed repo?

I tested it. The redirection is worked.

weynhamz commented 11 years ago

Did create neocomplete first, and then rename it to neocomplete.vim?

Yes.

From what I know, github does not do redirect for renamed repo?

I tested it. The redirection is worked.

I have just tested and confirmed that github can handle redirection for renamd repo even in git clone, this is awesome, finally, I can rename some my repos to a better naming covention. Maybe you should do the same to your other vim repos, change them to *.vim, e.g. neocomplcache.vim, of course, just a thought.

Shougo commented 11 years ago

I must rewrite default sources to use new interfaces. After it, I will rename neocomplcache ver.8.1 to neocomplete.

Maybe you should do the same to your other vim repos, change them to *.vim, e.g. neocomplcache.vim, of course, just a thought.

OK.

weynhamz commented 11 years ago

I have just renamed my https://github.com/techlivezheng/tagbar-phpctags to https://github.com/techlivezheng/vim-plugin-tagbar-phpctags, a convention I am following for all my vim plugin repositories by prefixing 'vim-pluin-', just like *.vim, it's a bit of personal taste.

Shougo commented 11 years ago

I renamed my repositories names completely.

weynhamz commented 11 years ago

I renamed repositories name completely.

That is great, haha, cheers.

zhaocai commented 11 years ago

tried the new fuzzy_matcher in ver8.1. Very nice and the speed issue seems to be solved by if_lua. How long do you plan to release a stable version?

thanks :)

function neocomplcache#handler#_do_auto_complete..neocomplcache#complete#_get_results..neocomplcache#complete#_set_results_words..336..<SNR>189_check_source..neocomplcache#cache#check_cache_noindex, line 11
Vim(for):E121: Undefined variable: a:keyword_list
Source name is buffer_complete
Error occured in source's gather_candidates()!    
Shougo commented 11 years ago

Thank you for your testing.

got A small bug...

I fixed it in latest version.

tried the new fuzzy_matcher in ver8.1. Very nice and the speed issue seems to be solved by if_lua. How long do you plan to release a stable version?

Stable version is provided in neocomplete.vim. Ver.5.1 is testing only.

I must rewrite default sources to use new interfaces.

zhaocai commented 11 years ago

@Shougo I have tried to play with YouCompleteMe for a while recently. One thing I would like to share is ThreadedCompleter - in neocomplcache's term, threaded source. It really has significant impact on speed.

As stated in the YouCompleteMe code,

If you're confident your completer doesn't need a background task (think again, you probably do) because you can "certainly" furnish a response in under 10ms, then you can perform your backend processing in a synchronous fashion.

I tested this speed impact by implementing a simple spellsuggest completer in YouCompleteMe. Without using threaded completer, I can certainly feel a lag for each keystroke I type. After I move the code to use ThreadedCompleter, the typing become smooth without delay.

And in YouCompleteMe, the auto event is CursorMovedI. In current neocomplcache, I have to use CursorHoldI event (but it is not as responsive as CursorMovedI). Otherwise, the lag of each keystroke is painful to waiting.

In short, I would ask about your plan for ver 8.1 in neocomplcache to solve the speed issue?

Will it support similar threaded fashion for sources?

Shougo commented 11 years ago
  1. Vim has not thread support.
  2. if_python with thread is too danger. Because, Vim functions and internal structures are not thread safe!(For example: spellsuggest() you used)
  3. I think if you implemented sources by if_lua, it is fast.

So, I cannot support thread in neocomplcache(and neocomplete).

PS: Your SpellcheckCompleter implementation is no input lag but too danger...

zhaocai commented 11 years ago

PS: Your SpellcheckCompleter implementation is no input lag but too danger...

I end up using a separate pyenchant lib instead spellsuggest() function provided by vim.

I agree with you on that thread is dangerous to use. And vim sucks for still not thread-safe and provide functionalities for async operations. However, The future of CPU will be more cores but higher speed for single core. To provide completion from many sources, it is natural to use the power from multi-cores; and it is impossible to provide no-type-lagging performance without harness multithreads.

I hope you may revise the source interface with thread support. Does lua have good thread support? I have no knowledge of the lua language.

Shougo commented 11 years ago

I hope you may revise the source interface with thread support. Does lua have good thread support? I have no knowledge of the lua language.

No. lua and Vim have not thread support! Lua is single thread only.

I hope you may revise the source interface with thread support.

I cannot revise it. But you can use multi-process instead of multi-thread. Or you can implement source by using if_python with thread(danger).

Shougo commented 11 years ago

I converted the default sources to new interfaces. So you can use full features in all default sources! But it may include bugs...

Shougo commented 11 years ago

I will rename neocomplcache to neocomplete.vim in next week!

Shougo commented 11 years ago

In neocomplcache ver.8.1(neocomplete.vim), fuzzy matching is default! And filename completion is too fast.

UncleBill commented 11 years ago

I will rename neocomplcache to neocomplete.vim in next week!

And the API?

And filename completion is too fast.

Great :+1:

Shougo commented 11 years ago

I must rename API and remove old interfaces.

Shougo commented 11 years ago

I started renaming.

https://github.com/Shougo/neocomplete.vim

But this is imcomplete. _You must not use it!_ I will change it critically.

Shougo commented 11 years ago

I removed legacy interfaces in neocomplete.

Shougo commented 11 years ago

I renamed source names in neocomplete.

For example:

buffer_complete -> buffer tags_complete -> tag

Shougo commented 11 years ago

If I renamed variable names in neocomplete, I will close this issue.

Shougo commented 11 years ago

I renamed variable names. So I will close it.

Shougo commented 11 years ago

I deleted ver.8.1 branch.