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

Not inserting quotes on html attribute completion #363

Closed marlun closed 11 years ago

marlun commented 11 years ago

Hi,

I asked in the vim mailinglist how to stop vim from inserting a quote for html attribute completion and got some help on how to fix it as you can see here:

https://groups.google.com/forum/?fromgroups=#!topic/vim_use/56Y_OtZnuso

However when I'm trying neocomplcache it adds the quote anyway. Any idea how I could make it not add the quote?

Shougo commented 11 years ago

This is not neocomplcache problem. I think it is htmlomnicomplete problem. I cannot fix it.

Shougo commented 11 years ago

But I may add the option next version. (I'm refactoring neocomplcahce in ver.8) g:neocomplcache#disable_insert_pair

marlun commented 11 years ago

If it is a htmlomnicomplete problem I thought the change I've added in autoload/htmlcomplete.vim should have fixed it, I'll look into it some more and see if I can find something.

Will keep my eyes open for version 8.

Shougo commented 11 years ago

If it is a htmlomnicomplete problem I thought the change I've added in autoload/htmlcomplete.vim should have fixed it, I'll look into it some more and see if I can find something.

You can use :scriptnames to find loaded pluguins.

marlun commented 11 years ago

It does not seem to be loaded for some reason. I have it inside a installed plugin: ~/.vim/bundle/vim-marlun/autoload/htmlcomplete.vim Before using neocomplcache and I only used Ctrl-X Ctrl-O it did work, is that file not run when neocomplcache uses the html omni completion?

Shougo commented 11 years ago

Please check your runtimepath. I think loaded default htmlcomplete.vim instead of custom htmlcomplete.vim.

marlun commented 11 years ago

/Users/marlun/.vim/bundle/vim-marlun is inside the &rtp.

Shougo commented 11 years ago

I think it is order problem. I think you should be "/Users/marlun/.vim/bundle/vim-marlun" in front of runtimepath.

marlun commented 11 years ago

I probably were doing the wrong thing before. I never did make an autocomplete before checking Scriptnames and since it's in an autoload folder it doesn't load until you do. However, after making an autocomplete it is loaded and I can see the following message if I check :messages

Error occured calling omnifunction: htmlcomplete#CompleteTags
function neocomplcache#auto_complete..neocomplcache#manual_complete..neocomplcache#get_complete_results..<SNR>98_set_complete_results_words..632..<SNR>106_set_complete_r
esults_words..htmlcomplete#CompleteTags, line 204
Vim(let):E684: list index out of range: 0
Shougo commented 11 years ago

It is htmlcomplete issue. Not neocomplcache...

marlun commented 11 years ago

Yes, I went through the code and found where the problem originated from. There are several places where you need to edit the code if you don't want the quotes.