如何在GoSublime中禁用func init()的自动完成功能?

huangapple go评论70阅读模式
英文:

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

huangapple
  • 本文由 发表于 2015年9月6日 15:20:23
  • 转载请务必保留本文链接:https://go.coder-hub.com/32421033.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定