且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

当使用自动完成字典以及当前文件时,Vim会冻结

更新时间:2023-01-28 15:55:01

我很抱歉:我要求更多的信息,而不尝试重现问题。我认为你在两个地方使用相同的词语,或至少可能的比赛是正确的。



它看起来像一个错误。我发现一次或两次< C-C> 我不需要做任何事情。



我发现如果我扭转顺序,问题就会消失:

 :set complete =。,k 


As was discussed here: Vim auto complete, both with current file and dictionary, I am trying to use both dictionary and current file in determining suggestions during auto-complete. In my vimrc I have the following two lines for auto-complete:

set complete=k,.
set dictionary+=pathfile-to-dictionary

But then when I press the auto-complete button I get error:

match in file the-dictionary-pathfile

And the system completely freezes with that error, i have to close the console and start over to get back to where I was. I've tried changing right settings to the dictionary file to 777 and I have tried putting dictionary file in home directory. Same error.

I have also noticed that the error pops up whenever I have a word both in dictionary and in current file and then try to auto-complete that very word. So it's probably some sort of collision between those two.

How can I use both dictionary and current file for word completion?

I apologize: I asked for more information without trying to reproduce the problem. I think you are right about having the same words, or at least possible matches, in both places.

It does look like a bug. I find that <C-C> once or twice gets me out; I do not have to do anything drastic.

I find that the problem goes away if I reverse the order:

:set complete=.,k