如何禁用Omnifunc AutoWrite建议
我是VIM的新手,今天我安装了VIM-GO。我用Omnifunc设置的GOPL设置自动完成为GO#完成#完成
。它可以按预期工作,但始终会自动写入当前的建议。这很烦人,因为它总是在不接受它的情况下写出建议。
I am new to vim and I installed vim-go today. I set up auto completion with gopls with omnifunc set as go#complete#Complete
. It works as expected but it always writes the current suggestion automatically. this is very annoying since it always writes the suggestion without me accepting it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
事实证明,问题是vim中
completeOpt
选项的默认值。将其编辑为具有值NOINSERT
解决了问题。在〜/.vimrc中添加以下行
设置完整=菜单,弹出,noinsert
以上只是一个例子。值除
NOINSERT
之外的值只是我自己的偏好。It turns out the problem was the default value of
completeopt
option in vim. editing it to have the valuenoinsert
solved the problem. add the following line in ~/.vimrcset completeopt=menuone,popup,noinsert
The above is just an example. the values except
noinsert
are just my own preferences.