Change the way how Netbeans auto formats for space indent for javascript function argument

4.4k views Asked by At

Let's say we have the simple code as below.

console.log(''+'Abb'+' '+'122');

And we want to make the argument clearer. We then change it to wanted form like below

console.log(''
    + 'Abb' 
    + ' ' 
    + '122'
);

Now comes the issue when we call Netbeans to format our code via Alt-Shift-F (menu: Source - Format)

The code turned into the form as below

console.log(''
    + 'Abb'
    + ' '
    + '122'
    );

How can we change this to 1) the spaces and 2) the close parenthese ) position as in the wanted form above?

1

There are 1 answers

2
Umang Mehta On

Go to

Tools > Options > Editor Tab > Formatting Tab > Select Language > Select Category

Now you have all the options of indentation that you can explore by yourself according to your needs.