Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Netbeans - custom shortcut to create HTML elements

I've been trying out Netbeans PHP stuff lately, over from Webuilder. In Webuilder, SHIFT+ENTER will make a <br /> element, while SHIFT+SPACE will make a &nbsp;.

Turns out this is really handy and I miss it in Netbeans. Is there a way to get this functionality somehow?

like image 971
Ben Avatar asked Dec 04 '22 20:12

Ben


2 Answers

You just have to click on Edit -> Start Macro Recording then you have to type in <br /> and afterwards click on Edit -> Stop Macro Recording. In the next window you can assign a name and shortcut to your Macro

Edit: And remove to shortcut for Start new Line in Tools -> Options -> Keymap because it is interfering

like image 87
DKSan Avatar answered Dec 07 '22 08:12

DKSan


The Code Templates feature might also be useful (especially for bigger chunks of code, like a class definition):

Tools > Options > Editor > Code Templates

like image 32
Rijk Avatar answered Dec 07 '22 10:12

Rijk