英文:
Prevent vim-go plugin from calling 'less' on save
问题
我正在玩弄"Go"编程语言,并使用带有vim-go插件的Vim。每次保存时,这个插件似乎会将文件的内容传输到less中,当文件变得更大时,这变得非常烦人。即使在"w"后面加上"!"也没有帮助。按下Q键可以移除"less"部分,这样就不需要一直按住回车键直到到达文件末尾,但我不想一直这样做。
有没有人使用这个插件,并知道如何在保存时阻止调用"less"呢?
英文:
I am playing around with the "Go" programming language and using Vim with the vim-go plugin. Every time I save, this plugin seems to pipe the contents of the file to less and this gets really annoying as the file becomes larger. Even putting a !
after the w
is not helping. Pressing Q removes the 'less' part which removes the need to hold in the enter key til the end of the file is reached but I don't want to keep doing that.
Anyone using this plugin and knows a way to prevent 'less' from being called on save?
答案1
得分: 1
<span class="comment-copy"><code>let g:go_fmt_fail_silently = 1</code> 和 <code>let g:go_fmt_autosave = 0</code> 似乎起到了作用。当我分别测试它们时,它们都可以独立工作。但我只是同时添加了它们,因为我没有什么可失去的。只是在尝试不同的设置。</span>
– <a href="/users/2090926/touch"
title="1,117 声望"
class="comment-user owner">Touch</a>
英文:
<span class="comment-copy"><code>let g:go_fmt_fail_silently = 1</code> and <code>let g:go_fmt_autosave = 0</code> seem to have done the trick. When I test each one separately, both work independently. But I just added them both because I have nothing to loosse. Just playing with the language.</span>
– <a href="/users/2090926/touch"
title="1,117 reputation"
class="comment-user owner">Touch</a>
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论