Formatting - Settings for JavaScript

In this window you can set up formatting options for JavaScript scripts

The settings window for JavaScript can be called from the Formatting Source Code window, or from the program settings window .

Block settings

Choose how the code is formatted:

Opening brackets in a new line
Select this option if you want the curly brackets marking the beginning of the function body to always be placed on a new line, as in the example below:
function function_name()
{
   // function contents
}
Opening brackets at the end of the line
Select this option if you want the curly brackets marking the beginning of the function body to be placed at the end of the line where the function name is, as in the example below:
function function_name() {
   // function contents
}

Single indent size
Select how many characters should be used for one line indentation.

Use tabs instead of spaces
Check if you want to use a tab character for indentation instead of spaces.

Do not indent blank lines
Check if indentation is not to be created in empty lines.

Line spacing

In this section, you can define whether to place additional blank lines between the individual functions. This increases the readability of the code.

Blank lines between functions
Select this option if you want additional blank lines to be inserted between successive function declarations.

Move instructions after semicolon to a new line
Check this option to break up instructions that are on one line (separated by semicolons) into multiple lines.

Related topics

To top