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;
 | }


Though I couldn't find macro for the same. But I found alternative. Use Ctrl+Shift+R toggle, for multiple line action at same time & add pipeline sign. But it take extra effort for starting and ending comment.

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

Need Your Help

Fast Order Statistic Tree in C# or a what DS is more efficient that SortedList providing the same functionality?

c# data-structures

I need a Fast Order Statistic Tree in my C# code. The only data structure I know that has IndexOf() method and keeps items sorted is SortedList. Unfortunately, its insertion complexity is O(n) unlike

Initial view controller and Tab View Controller

ios swift2 xcode7

I'm working with a single view app but also I'm using Tab View controller at one case , but the Tab view Controller must be put as initial view controller to work so how I can use Tab view controller