不确定该解决方案的可移植性如何(尤其是关于 Sublime 的不同版本)。我在 Linux (Fedora 34) 上,并使用他们的 official repo 中的最新 Sublime(在撰写本文时构建 4121)和注册许可证。
但我认为我遇到的问题与您的问题相似(您的帖子是“sublime disable auto complete on tab”的第一个duckduckgo结果)。基本上,我已经在我的首选项文件中将auto_complete 和auto_match_enabled 都设置为false,但如果我有一些文本,例如:
async: false,
然后我将光标放在异步中的“c”之后并点击 TAB,它会尝试自动完成以“异步”开头的某个单词。但我想要的行为是让它从字面上插入一个 TAB (\t) 字符,而不是使用 TAB 作为自动完成触发器。
读完这篇文章后,我尝试了"auto_complete_commit_on_tab": false,这似乎对我也不起作用。我不知道如何覆盖选择器键绑定,所以我开始在“shot弹枪方法”中禁用许多自动完成设置。我确实在网上搜索了设置,但大多只是脱离了设置文件全局/左侧的描述。
我不确定执行此操作的确切设置,但现在它的行为与我想要的 TAB 一样,只需插入一个 \t 字符。我怀疑"auto_complete_size_limit": 1 可能是最相关的设置,但我不确定。
这是我的首选项文件供参考:
{
"always_prompt_for_file_reload": true,
"atomic_save": true,
"auto_close_tags": true,
"auto_complete": false,
"auto_complete_size_limit": 1,
"auto_complete_selector": "",
"auto_complete_commit_on_tab": false,
"auto_complete_with_fields": false,
"auto_complete_cycle": false,
"auto_complete_use_index": false,
"auto_complete_use_history": false,
"auto_complete_trailing_symbols": false,
"auto_complete_include_snippets": false,
"auto_complete_include_snippets_when_typing": false,
"auto_match_enabled": false,
"copy_with_empty_selection": false,
"drag_text": false,
"detect_indentation": true,
"ensure_newline_at_eof_on_save": true,
"font_size": 15,
"highlight_modified_tabs": true,
"show_encoding": true,
"show_line_endings": true,
"tab_completion": false,
"translate_tabs_to_spaces": false,
"trim_automatic_white_space": true,
"trim_trailing_white_space_on_save": true,
"update_check": false,
"close_find_after_find_all": false,
"close_find_after_replace_all": false
}