Yeah! I always press Enter key. That works only if u press TAB
Notice that you do not have a code completion popup at that point. And that is correct behaviour because TAB is the default expand key for Emmet (the name of that feature/functionality).
You can change that at “Settings/Preferences | Editor | Emmet” if so desired but keep in mind that changing it to ENTER may cause unexpected behaviour in other places (e.g. apple[ENTER] will become <apple></apple> in HTML context etc.)
Ok, what about writing “dib” to get “display: inline-block”? how can I setup that behaviour?
What is wrong about it right now? It works fine here as well: type dib[TAB] and you get display: inline-block; (d:ib (the correct name) is a standard Emmet abbreviation and therefore appears in the code completion):
Anyway: all standard (static) Emmet abbreviations are implemented via Live Templates functionality (code snippets basically; it existed long before Emmet was created).
You can see all such standard abbreviations and change them as you wish at “Settings/Preferences | Editor | Live Templates” -- under “Zen XXX” nodes (just in case: "Zen CSS" is the original/initial name of Emmet). Here you can change the expand key per template or change the default one (drop down box at the top of that screen).
An advice (from personal experience):
If you want to add your own template – just create a custom group and add it there.
If you want to edit bundled one – disable it in the original place and make your own in your custom group.
This way it will not mess up if bundled ones will be updated in the future or just during the IDE update (plus you can always check the original one if you need to revert it back etc.)
Hi there,
This works just fine for me in a simple
.css
file in my simple test project – r15, m15, mr15.What shortcut/key do you press after typing
r15
?Does it work in the brand new empty project with a single file?
Yeah! I always press Enter key. That works only if u press TAB
Notice that you do not have a code completion popup at that point. And that is correct behaviour because TAB is the default expand key for Emmet (the name of that feature/functionality).
You can change that at “Settings/Preferences | Editor | Emmet” if so desired but keep in mind that changing it to ENTER may cause unexpected behaviour in other places (e.g.
apple[ENTER]
will become<apple></apple>
in HTML context etc.)Ok, what about writing “dib” to get “display: inline-block”? how can I setup that behaviour?
What is wrong about it right now? It works fine here as well: type
dib[TAB]
and you getdisplay: inline-block;
(d:ib
(the correct name) is a standard Emmet abbreviation and therefore appears in the code completion):Anyway: all standard (static) Emmet abbreviations are implemented via Live Templates functionality (code snippets basically; it existed long before Emmet was created).
You can see all such standard abbreviations and change them as you wish at “Settings/Preferences | Editor | Live Templates” -- under “Zen XXX” nodes (just in case: "Zen CSS" is the original/initial name of Emmet). Here you can change the expand key per template or change the default one (drop down box at the top of that screen).
An advice (from personal experience):
This way it will not mess up if bundled ones will be updated in the future or just during the IDE update (plus you can always check the original one if you need to revert it back etc.)