Sublime Forum

Autocomplete popup without having to type property value

#1

Very interested in Sublime Text, however there is a big issue for me in regards to CSS autocomplete behavior. Sublime Text makes you start typing a value before it shows the autocomplete popup. However, it should show the available values before you start typing a value. Such as these programs do:

Dreamweaver https://www.screencast.com/t/WXpzqKZps
Atom https://www.screencast.com/t/yqcWFaoQ1nF
Brackets https://www.screencast.com/t/nqgLSZu67

But as you can see in Sublime Text, the autocomplete popup doesn’t show and forces you to type before it does show: https://www.screencast.com/t/0TLUZatHKMjR

This is pretty critical for me since I’ve been accustomed to that method for years. I like just hitting Enter on a property autocomplete, then going straight to the arrows to select a value, without having to start typing a value first.

Is there an addon package that does this if there’s no settings to make this happen? Or are you planning on implementing this behavior by default soon hopefully?

0 Likes

#2

this is configurable - because manually triggering auto complete works, without needing to start typing something.

maybe try something like:

"auto_complete_triggers": [
    {
        "characters": ": \t",
        "selector": "meta.property-list.css, punctuation.section.property-list.css",
    },
],

see also

0 Likes

#3

Probably a more elegant way to do this, but here’s how I setup autocomplete to initiate no matter what alpha-numeric character I enter (FYI, this snippet of code goes in your Preferences > Settings file):

"auto_complete_triggers":
	[
		{
			"characters": "a b c d e f g h i j k l m n o p q r s t u v w z y z 1 2 3 4 5 6 7 8 9 0",
			"selector": "text.html"
		}
	],
0 Likes