Sublime Forum

Stop attribute autocompletion inside quotes in HTML

#1

I have disabled auto completion
When I have an HTML attribute and I press tab to complete it
it auto generates ="" for me but it opens auto complete menu and I don’t want that

0 Likes

#2

auto_complete setting just specifies whether completion panel displays automatically while writing.

When hitting tab key it is displayed if multiple snippets are available to avoid committing an unwanted/wrong candidate.

Only if a tab trigger of a sublime-snippet file matches perfectly and no duplicates are present, tab key immediately commits its content. It does however not apply to html attributes as they are implemented as completions by a plugin.

Short story long, you can’t keep attribute snippet expansion without a completion panel possibly showing up. To completely disable that, you’d need to override tab key in ur user key bindings.

Your best chance might be to try "mini_auto_complete": true if only the panel is, what’s unwanted. The setting will cause completion candidates to be displayed as phantom.

0 Likes

#3


This is what i mean after I press tab it opens this I don’t want it to open unless I press ctrl+space
If I don’t use completion for the attribute and just type the whole thing It won’t show unless I use the shortcut

0 Likes

#4

That’s tweakable via auto_complete_selector. It enables auto completions within whole tags (meta.tag) by default, even though I’d expect it not to show up anything if auto_complete: false is set.

The following should do what you want.

"auto_complete_selector": "meta.tag - string, source - comment - string",
0 Likes

#5

Yeah, it worked thank you.

0 Likes