Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating macros in netbeans

I wish to create macro in Netbeans to put block comment over function. I have preference of code formatting over file save. So When I close file it saves code automatically and format it.

Issue is when I create function and comment it. It unformatted my whole block of code like this.

/**
 *function abc(){
 *var a, b = 50;
 *}
 */

I wish to create comment like this. so it keep my coding properly formatted as well.

 /*
 |
 | function abc(){
 |     var a, b = 50;
 | }
 |
 */ 
like image 619
Sankalp Avatar asked May 06 '15 08:05

Sankalp


1 Answers

You can add your own macro by Following this instructions:

  1. Edit->Start Macro Recording
  2. Edit->Stop Macro Recirding
  3. It Will pop-up one Box For Editor Macros->Add Your Choice of Macro Name
  4. In code area add Your custom comment code in " your code "; Like,

Blockquote "/* | | function abc(){ | var a, b = 50; | } | */"

  1. Assign a Short Cut Key to your Custom Macro.

That's It

like image 154
Chintan7027 Avatar answered Sep 19 '22 15:09

Chintan7027