简体   繁体   English

Sublime Text删除python新属性自动完成

[英]Sublime Text remove python new property autocomplete

I love sublime text. 我喜欢崇高的文字。 I know that I can disable autocomplete altogether in the settings, however I just want to disable one of the autocomplete options. 我知道我可以在设置中完全禁用自动完成功能,但我只想禁用其中一个自动完成选项。

When you type an @property decorator in python you get an autocomplete option called New Property which if selected generates a getter and setter for you. 当您在python中键入@property装饰器时,您将获得一个名为New Property的自动完成选项,如果选择该选项,则会为您生成一个getter和setter。 This ends up being more of a pain than a benefit for me. 这最终会给我带来痛苦而不是好处。 Any ideas about how to remove that autocomplete option? 有关如何删除该自动完成选项的任何想法?

Sublime Text 2 崇高文本2

You can remove Packages/Python/New-Property.sublime-snippet . 您可以删除Packages/Python/New-Property.sublime-snippet The Packages directory location depends on the system you are using: Packages目录位置取决于您使用的系统:

  • Windows: %APPDATA%\\Sublime Text 2\\Packages Windows: %APPDATA%\\Sublime Text 2\\Packages
  • Linux: ~/.config/sublime-text-2/Packages Linux: ~/.config/sublime-text-2/Packages
  • OS X: ~/Library/Application Support/Sublime Text 2/Packages OS X: ~/Library/Application Support/Sublime Text 2/Packages

Sublime Text 3 崇高文本3

The structure is a little different in Sublime Text 3. Personally I don't use it yet, but this might give you some idea about how to achieve the same result in ST3. Sublime Text 3中的结构略有不同。就个人而言,我还没有使用它,但是可能会让你对如何在ST3中获得相同的结果有所了解。

By the way, these solutions are not ideal. 顺便说一句,这些解决方案并不理想。 When you reinstall or upgrade Sublime Text the snippet will be back. 当您重新安装或升级Sublime Text时,该片段将会返回。 But I'm not aware of any way to disable snippet via user config. 但我不知道有任何方法可以通过用户配置禁用代码段。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM