如何禁用Omnifunc AutoWrite建议

发布于 2025-02-02 07:18:57 字数 123 浏览 0 评论 0原文

我是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技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

淡莣 2025-02-09 07:18:57

事实证明,问题是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 value noinsert solved the problem. add the following line in ~/.vimrc

set completeopt=menuone,popup,noinsert

The above is just an example. the values except noinsert are just my own preferences.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文