6

I just installed the Emmet plugin for Netbeans, but I can't find in the docs how to trigger the code expansion.

Bryan
  • 17,201
  • 24
  • 97
  • 123
  • Isn't it written in the readme that there are almost none predefined? Quoting: "By default, plugin has almost no shortcuts..." Did you try to define them first? Or you can choose Edit->Emmet from top main menu – ladar Sep 11 '13 at 20:46
  • I am not sure what you mean by almost no shortcuts. I thought by default Emmet would expand div>ul>li into
    – Bryan Sep 13 '13 at 17:46
  • I'm just quoting the readme of the plugin. I remember when I tried it long time ago, I need to either use Edit->Emmet or define custom shortcuts – ladar Sep 15 '13 at 09:33

5 Answers5

6

You can expand code using the default "ctrl+cmd+N" on a mac.

I came across this question trying to find out if there was anyway that I could configure the code expansion to trigger by just using the "tab" key.

Anyways, I hope this helps someone!

pat
  • 1,119
  • 2
  • 12
  • 20
  • 4
    Actually, to answer my own question now. You can set the trigger key to "tab" or any other key, by doing the following on a mac. Go to Netbeans>Preferences>Keymap and look for "Expand Abbreviation", under the Actions column. You can then set the trigger to any key you want. But, make sure you dont override any other triggers. Eg, tab is a popular trigger, hence i used "tab tab" or 2 tab clicks to trigger my code expansion. – pat Nov 06 '13 at 11:28
2

I am using netbeans ver 8.1 in ubuntu 15.10. After selecting your CSS code,use ctrl+alt+n to trigger emmet code completion.

Noha Salah
  • 493
  • 1
  • 7
  • 11
1

You can't use the TAB key to expand abreviation from Emmet in Netbeans. Indeed if you chose the TAB key as shortcut for it, you will erase the shortcut for "Insert tab" and you will not be able to insert tabulation anymore...

The only way is to use the Code Templates in Netbeans and transform all the abreviation from Emmet into a code template, one by one :(

If you want, I've made the code templates for the CSS abreviations in Emmet (Only CSS). With that you can expand the abreviation just with TAB key.

Here is my Github (It's my first... I hope it will work well) https://github.com/Everice/NetBeans---Emmet-Code-Templates.git

Everno
  • 33
  • 5
1

I am using Netbeans 8.1 and ctrl+alt+N working for me (My operating system is windows 10 ) you can use ctrl+cmd+N If you are using MAC

svarog
  • 9,477
  • 4
  • 61
  • 77
Shakil Hossain
  • 1,701
  • 13
  • 25
0

If you are using the newer Plugin from github.com/emmetio/netbeans (the old one is deprecated) You can set Emmet expansion by using the tab key.

The README in the github repo mentions this

Expand abbreviations with the TAB key. Go to Tools > Options > Miscellaneous > Emmet tab. Then check it.

And I can confirm it works for Netbeans11.

svarog
  • 9,477
  • 4
  • 61
  • 77