Sublime Forum

How to disable autocomplete

#1

I don’t have any packages or plugins installed; in a C file if I type:

auto x<tab>

ST4 brings up a “completion window”. I do not want this — ST4 has a 0% chance of knowing what I want, and I have to dismiss it. I don’t know why ST4 suddenly has this behavior but it kind of sucks.

Here’s the settings I’ve tried, to no avail, to get ST4 to stop trying to autocomplete:

{
	"color_scheme": "Packages/User/Themes/Printer.tmTheme",
	"draw_white_space" : ["all"],
	"tab_completion" : false,
	"auto_complete" : false,
	"auto_complete_delay": 50000000000,
	"font_size": 10,
	"theme": "auto",
	"word_wrap": "false",
	"translate_tabs_to_spaces": true,
	"trim_trailing_white_space_on_save": "all",
	"ensure_newline_at_eof_on_save": true,
	"auto_complete_triggers": [],
	"auto_complete_use_index": false,
	"auto_complete_include_snippets": false,
	"auto_complete_include_snippets_when_typing": false,
	"ignored_snippets": ["C++/*"],
}
0 Likes

Auto complete still occurs even though it is disabled
#2

The version is ST4 4143.

0 Likes

#3

A completion panel being disabled despite all auto completion settings being disabled indicates multiple snippets’ tabTriggers matching current input.

Default C++ package of ST doesn’t shippets or completions related to auto keywords.

If no 3rd-party package is installed the only remaining option may be snippets in User package.

0 Likes

#4

As afar as I can tell, the issue was that I was using a TextMate theme. I can reliably cause the issue to reproduce — and go away — by installing and removing the theme. The theme is very basic — written in XML, and designed for black&white printing.

0 Likes

#5

Seems rather unlikely, but that theme seems to ship some snippets then.

0 Likes

#6

I know it’s been two weeks, but I’m still getting tab completion when pressing tab. This sucks. My preferences are at the end of this message. I have no plugins of any sort installed. The version number is 4143, on macOS 13.3.1.
// Settings in here override those in “Default/Preferences.sublime-settings”,
// and are overridden in turn by syntax-specific settings.
{
“auto_complete”: false,
“tab_completion”: false,
“always_show_minimap_viewport”: true,
“draw_white_space”: [“all”],
“trim_trailing_white_space_on_save”: “all”,
“translate_tabs_to_spaces”: true,
“theme”: “Default.sublime-theme”,
“color_scheme”: “Celeste.sublime-color-scheme”,
“font_size”: 10,
“word_wrap”: false,
}

0 Likes

#7

12%20AM

0 Likes

#8

The only way to fully disable snippet completions currently is with custom keybindings, eg:

{ "keys": ["tab"], "command": "insert", "args": {"characters": "\t"} },
2 Likes

#9

Can someone explain how to do the keybindings thing (where, what menu, etc) that @bschaaf talked about?

I too absolutely hate all forms of tab completion. Thoroughly infuriating, especially when none of the Settings flags do anything to prevent it.

UPDATE
@bschaaf’s suggestion seems to work, but if you only do that, it will break select+tab to indent a bunch of selected lines all at once. Below is the fix to eliminate autocomplete but keep select+tab indentation:

  1. Go to Preferences | Keybindings
  2. Then add these lines of code in the right-hand pane between the pre-existing square brackets:
	{ "keys": ["tab"], "command": "insert", "args": {"characters": "\t"} },
	{ "keys": ["tab"], "command": "indent", "context":
		[{ "key": "text", "operator": "regex_contains", "operand": "\n" }]
	},

There might be other things that break by doing this … I will just keep updating this post with problems + solutions as I encounter them.

0 Likes