Skip to content

Commit

Permalink
make clear that caret immediately before space
Browse files Browse the repository at this point in the history
  • Loading branch information
pryrt committed Nov 23, 2024
1 parent 9cffa0b commit ea86a8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion content/docs/preferences.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ These settings were all a part of the [**Language**](#language) settings before
- `☐ Basic`: If you hit <kbd>Enter</kbd> on a line that's indented, the next line will be indented the same amount as the current line.
- `☐ Advanced`: If you hit <kbd>Enter</kbd> on a line that's indented, the next line will usually be indented the same amount as the current line; but for programming languages that allow hierarchical blocks (like a `for(){...}` loop in C/C++), it can automatically add the extra indentation when you start a new block, and end the extra indentation when you close the block.
- This option was previously the `☐ Auto-indent` checkbox in the [**Auto-Completion** preferences](#auto-completion) (before v8.7), and would just allow choosing between automatically indenting or not, always using the "advanced" algorithm (so in older versions, you cannot force Basic-style auto-indentation).
- _Note_: For either Basic or Advanced mode, if you hit <kbd>Enter</kbd> in the middle of an indented line, before one or more space or tab characters (like before the space in `two words`), the space(s) will get converted into the indentation character(s) for the new line (so in the example, `words` will be indented, but without the extra space). It will, however, leave the [caret](#caret-and-cursor "typing/insertion cursor") at the start of the line, rather than immediately before the first non-space character on the line. If you have some words, then a space, then the end-of-line, hitting <kbd>Enter</kbd> just before that space will create a new, indented line with the proper indentation, but the [caret](#caret-and-cursor "typing/insertion cursor") will be at the beginning of the line, and not indented (so if you don't have **View > Show Symbol > Show Space and Tab**, you might incorrectly think that auto-indent didn't work on that line).
- _Note_: For either Basic or Advanced mode, if you hit <kbd>Enter</kbd> while the [caret](#caret-and-cursor "typing/insertion cursor") is in the middle of an indented line, immediately before one or more space or tab characters (like between the `o` and the space in `two words`), the space(s) will get converted into the indentation character(s) for the new line (so in the example, `words` will be indented, but without the extra space). It will, however, leave the [caret](#caret-and-cursor "typing/insertion cursor") at the start of the line, rather than immediately before the first non-space character on the line. If you have some words, then a space, then the end-of-line, hitting <kbd>Enter</kbd> just before that space will create a new, indented line with the proper indentation, but the [caret](#caret-and-cursor "typing/insertion cursor") will be at the beginning of the line, and not indented (so if you don't have **View > Show Symbol > Show Space and Tab**, you might incorrectly think that auto-indent didn't work on that line).

### Highlighting

Expand Down

0 comments on commit ea86a8e

Please sign in to comment.