Sublime Forum

I would like my custom Emmet snippets to keep being tab-triggered even in CSS files

#1

I’ve found some people complain that Emmet breaks CSS behavious, but I haven’t found a solution to what I want. I don’t want to disable Emmet in CSS files to get the default tab-trigger back, what I want is Emmet to have precedance.

Currently, when I type

comment

and press Tab, this becomes

comment: ;

Instead, what I want is to fire my Emmet snippet that has a <tabTrigger>comment</tabTrigger> defined.

Following some tips, I have tried to disable Sublimetext’s default tab completion behaviour, by doing:

"tab_completion": false,
"auto_complete_commit_on_tab": false

But that didn’t change anything in this regard.

I am running Sublime Text 3, build 3126.

0 Likes

#2
0 Likes

#3

If I understood them correctly, my issue is of a vice-versa nature to theirs. They worked on limiting the snippets to CSS files, but in my case it already works everywhere except in CSS files, which is what I don’t want.

Furthermore, this section from Emmet’s documentation:

You have to switch your document to one of the syntaxes listed above to expand abbreviations by Tab key.With Ctrl-E shortcut, you can expand abbreviations everywhere, its scope is not limited.

suggests that I should always be able to get my comment snippet to work in a CSS file by hitting Ctrl+E – but it doesn’t work.

0 Likes