当使用自动完成字典以及当前文件时,Vim会冻结 [英] Vim freezes when using auto-complete with dictionary as well as current file

查看:117
本文介绍了当使用自动完成字典以及当前文件时,Vim会冻结的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如下所述: Vim自动完成,包括当前文件和字典
我正在尝试使用字典和当前文件来确定自动完成期间的建议。
在我的vimrc中,我有以下两行用于自动完成:

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

但是当我按自动完成按钮我收到错误:

 在文件中匹配the-dictionary-pathfile 
pre>

系统完全冻结该错误,我必须关闭控制台,重新开始重新回到我的位置。
我已经尝试将正确的设置更改为字典文件到777,我已经尝试将字典文件放在主目录中。同样的错误。



我也注意到,当我在字典和当前文件中都有一个字时,会弹出错误,然后尝试自动完成这个字。所以这可能是这两种之间的某种碰撞。



如何使用字典和当前文件进行单词完成?

解决方案

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



它看起来像一个错误。我发现一次或两次< 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

这篇关于当使用自动完成字典以及当前文件时,Vim会冻结的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆