英文:
How can I disable func init() autocomplete in GoSublime?
问题
每次我输入关键字int
时,都会经常出现一个自动补全的建议:
func init() {
}
所以每次我写完int
并按下回车,我就会得到这个函数,然后我必须手动删除它,然后重新写int
,再点击左右箭头几次,直到自动补全消失。
当你在一个小时内不得不这样做很多次时,这是一种糟糕的体验。我该如何解决这个问题?
英文:
Every time I enter the keyword int
which is quite often.. I get a suggestion for autocompletion on
func init() {
}
So every time I write int
and press enter I end up with this function, and then I have to manually remove it and then rewrite int
again and click left and right arrow a couple of times until the autocompletion disappears.
This is a horrible experience when you have to do it so many times in 1 hour.. How can I solve it?
答案1
得分: 3
在你的GoSublime软件包设置中(如果你还没有,请将默认设置复制到用户设置中),有一行代码如下:
{"text": "init", "title": "func init()", "value": "func init() {\n\t$1\n}"},
删除它,我认为你就没问题了。
英文:
In your GoSublime package settings (copy the default to user if you haven't already), there's a line that goes:
{"text": "init", "title": "func init()", "value": "func init() {\n\t$1\n}"},
Delete it and I think you'll be fine
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论