在 Atom 中禁用单个自动完成
Disable individual autocompletes in Atom
我正在使用 Github 的 Atom,在编写 go 时,我得到了这个:
自动完成为:
package func main() {
}
这在 Go 中是不合法的。
我可以直接按 space 或在自动完成后撤消它,但是是否可以在 Atom 的自动完成引擎中禁用单个自动完成?
您所描述的自动完成功能在 Snippets in GitHub's Atom parlance. At the time of writing, disabling snippets introduced by either core or community packages is not supported, there is however a enhancement ticket to provide support in the Snippets package.
中
作为替代方案,您可以按照 Atom Flight Manual 中的说明使用有效 Go 的代码段覆盖 main
代码段,这可能是不可能的,或者只是替换单词的代码段main
和 main
,只需将以下内容添加到您的个人 snippets.cson
即可从 File
-> Snippets...
:
访问
'.source.go':
'Main':
'prefix': 'main'
'body': 'main'
充其量它是一种 hack,但它确实可以防止主代码段在您不希望扩展时扩展。
我正在使用 Github 的 Atom,在编写 go 时,我得到了这个:
自动完成为:
package func main() {
}
这在 Go 中是不合法的。
我可以直接按 space 或在自动完成后撤消它,但是是否可以在 Atom 的自动完成引擎中禁用单个自动完成?
您所描述的自动完成功能在 Snippets in GitHub's Atom parlance. At the time of writing, disabling snippets introduced by either core or community packages is not supported, there is however a enhancement ticket to provide support in the Snippets package.
中作为替代方案,您可以按照 Atom Flight Manual 中的说明使用有效 Go 的代码段覆盖 main
代码段,这可能是不可能的,或者只是替换单词的代码段main
和 main
,只需将以下内容添加到您的个人 snippets.cson
即可从 File
-> Snippets...
:
'.source.go':
'Main':
'prefix': 'main'
'body': 'main'
充其量它是一种 hack,但它确实可以防止主代码段在您不希望扩展时扩展。