Netbeans - Custom Shortcut for Creating HTML Elements

I have recently tested Netbeans PHP stuff starting with Webuilder. In Webuilder, SHIFT + ENTER will create a <br /> element, and SHIFT + SPACE will do &nbsp; .

Turns out it's very convenient, and I miss it at Netbeans. Is there any way to get this functionality in some way?

+4
source share
3 answers

You just need to click Edit -> Start Macro Recording , then you need to enter <br /> and then click Edit -> Stop Macro Recording . In the next window, you can assign a name and shortcut to your macro

Edit: And remove the shortcut for Start new Line in Tools -> Options -> Keymap because it interferes

+10
source

The code template function can also be useful (especially for large code snippets, such as class definitions):

Tools> Options> Editor> Code Templates

+5
source

You can create macros and assign a shortcut to a macro.

+1
source

All Articles