Sublime Forum

Drop down list when typing text between single or double quotes

#1

Hi

I’ve recently upgraded to Sublime Text 4 and there are few things that I don’t completely master.

When I work with PHP or JavaScript files, when I open single or double quotes and start typing, I have an annoying drop down list that suggests me pretty much anything.
When I set “auto_complete” to “false”, it doesn’t display anymore but I obviously not don’t what to completely turn off the auto completion. So I know that it has something to do with auto completion but I couldn’t find how to disable it.

Does anyone have an idea on that?

0 Likes

#2

Context to automatically display completions while typing is controlled by "auto_complete_selector" setting, which by default excludes multi-line strings, only.

To disable auto-completions within all sorts of strings, adjust it to something like…

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

Modern syntaxes clear string scope within interpolation, so auto-completion would still work then.

0 Likes

#3

Thank you very much for your response, it indeed worked!

So now there are still suggestions when I type the character “<”. How to adjust to avoid this behavior?

0 Likes

#4

Adjust …

	// Additional situations to trigger auto complete
	"auto_complete_triggers":
	[
		{"selector": "text.html, text.xml", "characters": "<"},
		{"selector": "punctuation.accessor", "rhs_empty": true},
	],
0 Likes