Sublime Forum

Auto complete still occurs even though it is disabled

#1

It is frustrating when the “tab” key tries to autocomplete something rather than inserting a tab.

AFAICT I have every auto complete option disabled. Why would I get auto complete suggestions when hitting “tab” after typing “int” into a .cpp file?

0 Likes

Nothing stops tab from auto-suggestion and auto-complete
#2

Sublime Text distinguishes:

  • snippets
  • auto completions (from plugins)
  • fixed completions (from *.sublime-completions files)
  • word completions (from buffer)

All of them are provided via completion panel in various situations.

What you see are snippets, despite completions being disabled.

  • Setting auto_complete: false disables completion panel being automatically displayed while typing. It can still be triggered via ctrl+space, tab or other triggers (API).
  • Setting "auto_complete_include_snippets_when_typing": false excludes snippets from completion panel, if it is triggered automatically while typing. They are still suggested, if triggered by a different event.
  • Setting tab_completions: false disables completions when hitting tab after a word. It doesn’t effect snippets.

To prevent snippets from being suggested at all via completion panel (no matter which trigger), you could set

  1. "auto_complete_include_snippets": false. Snippets are available only via Command Palette then.
  2. Exclude certain snippets via "ignored_snippets": ["C++/*"]. The example excludes all C++ snippets, shipped with ST.

Another option is to override tab key binding to prevent it triggering completion panel.

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

see also: How to disable autocomplete

1 Like