简体   繁体   English

如何在 Sublime Text 中禁用自动完成 (2&3)

[英]How to disable Auto Complete in Sublime Text (2&3)

在此处输入图片说明 I understand there are a few questions surrounding the auto_complete function in Sublime Text.我知道关于 Sublime Text 中的 auto_complete 函数存在一些问题。

However, I have not been able to disable the auto_complete function in the Sublime Text settings (I've tried both Sublime Text 2&3).但是,我无法在 Sublime Text 设置中禁用 auto_complete 功能(我已经尝试了 Sublime Text 2 和 3)。 I just get the "Error trying to parse settings: Unexpected trailing characters in Packages/User/Preferences.sublime-settings:5:1" error when inputting the {"auto_complete": false,} command in user settings .我刚刚得到的"Error trying to parse settings: Unexpected trailing characters in Packages/User/Preferences.sublime-settings:5:1"输入错误时, {"auto_complete": false,}用户设置的命令。

Would love to turn off the setting, but can't find a way to.很想关闭设置,但找不到方法。 Any help much appreciated!非常感谢任何帮助!

在此处输入图片说明

Put , after font-size:17 like:,放在font-size:17如:

{
  "font_size":17, //note a comma here after 17
  "auto_complete": false,    
}

There are two options:有两种选择:

1: In Preference --> User, Check if TernJS plugin is Installed. 1:在首选项-> 用户中,检查是否安装了TernJS plugin If Yes, Unistall it from your editor (ie Sublime Text Editor).如果是,请从您的编辑器(即 Sublime 文本编辑器)中卸载它。

2: In Preferences --> User, check for the auto_complete and change it to false 2:在 Preferences --> User 中,检查auto_complete并将其更改为 false

"auto_complete": false, “自动完成”:假,

Restart Your Editor(Sublime Text)重启你的编辑器(Sublime Text)

This is the first result that pops up when Googling "Sublime Text disable autocomplete", and none of the answers answered my question completely, so I'd just like to add to the existing answers that if you are setting auto_complete to false and still having problems with Sublime Text auto-closing parentheses and brackets, then you also need to set auto_match_enabled to false.这是在谷歌搜索“Sublime Text 禁用自动完成”时弹出的第一个结果,并且没有一个答案完全回答我的问题,所以我只想添加到现有答案中,如果您将 auto_complete 设置为 false 并且仍然有Sublime Text 自动关闭括号和括号的问题,那么您还需要将 auto_match_enabled 设置为 false。 This should solve the problem.这应该可以解决问题。 So as a whole, here is what I have:总的来说,这就是我所拥有的:

{
    "auto_complete": false,
    "auto_complete_commit_on_tab": false,
    "auto_close_tags":false,
    "auto_match_enabled": false
}

This should be the option.这应该是选项。

{
    "auto_close_tags":false
}

My solution to this problem was to change "auto_complete_commit_on_tab" from true to false.我对这个问题的解决方案是将“auto_complete_commit_on_tab”从 true 更改为 false。 This way you aren't turning off autocomplete altogether, but the autocompletion is ignored unless you hit the tab key.这样您就不会完全关闭自动完成功能,但除非您按下 Tab 键,否则自动完成功能将被忽略。

In preferences, user settings, add:在首选项、用户设置中,添加:

{
"auto_complete_commit_on_tab": false
}

I came here looking for a Python-related solution, where autocompletion worked well for variable names etc. but was quite slow for methods etc.我来这里是为了寻找与 Python 相关的解决方案,其中自动完成对变量名等很有效,但对方法等来说很慢。

So, to disable Python syntax autocomplete:因此,要禁用 Python 语法自动完成功能:

  • open the command palette with ctrl + shift + P使用 ctrl + shift + P 打开命令面板
  • enter Package Control: Remove Package and select it输入包控制:删除包并选择它
  • enter Jedi and remove the Jedi autocomplete package进入Jedi并删除Jedi 自动完成

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

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