Smart editing - indenting, tabs, and backspace
Code Editor has smart editing features for indenting, tabs, and backspace.
Smart Indent
The Smart Indent feature is enabled by default. After you press the Enter key, the new line is indented to align with the immediately preceding non-blank line.
01 int var1 = 55;
02 boolean var2 = true;
If you do not wish your new line to be aligned with the preceding line, use the Left Arrow key to move the cursor towards the left margin of the page.
Smart Tabs
The Smart Tabs feature is enabled by default. When the Tab key is pressed at the beginning of a line, the cursor is aligned with the first character following the next whitespace on the immediately preceding non-blank line. For example:
01 DEFINE
02 var1 INTEGER,
03 var2 INTEGER
01 public class Person {
02 public String Name;
03 public int Age;
If the preceding line does not have embedded whitespace, the Tab key moves the cursor the number of spaces indicated by the Tab size setting in the Behavior and display preferences.
Smart Backspace
The Smart Backspace feature is enabled by default. Pressing the Backspace key will move the cursor back in the current line to the position of the indent in the previous line.
Disable Smart features
To disable Smart features, select , then (or, if you are on a Mac, ) . For more information, see Behavior & Display preferences.