Preferences Keys
Formatting preferences are serialized as key-value pairs, by default under $HOME/.config/Code/User/settings.json.
Preference Name |
Details |
Preference Key |
Default Value |
---|---|---|---|
Whitespace |
|||
Compact Whitespace Groups |
Controls whether to compact consecutive whitespace characters. |
|
false |
Compact Consecutive Empty Lines |
Controls whether to compact consecutive empty lines. |
|
false |
Maximum Number Of Consecutive Empty Lines |
Maximum number of consecutive empty lines that can appear in a file. |
|
1 |
Trim End of Line Whitespace |
Controls whether to trim end of line whitespaces. |
|
true |
Trim Whitespace Lines |
Controls whether to trim lines containing only whitespaces. |
|
true |
Indentation |
|||
{ |
Controls the placement of |
|
1 (“Leave as is”) |
Do Not Indent Single Line Comments At Beginning Of Line |
Controls whether to indent single line comments starting at the beginning of a line. |
|
true |
Ignore Lines Starting With |
List of line prefixes matching lines that will be ignored while indenting. |
|
[] |
Insert spaces |
Insert spaces when pressing tab. |
|
true |
Tab width |
Controls the size of a tab in spaces. |
|
4 |
Vertical Alignment |
|||
Enable Vertical Align |
Controls whether to enable vertical alignment. |
|
false |
Only Consecutive Lines |
When enabled, only consecutive lines (lines that follow each other or are separated by comment lines) are vertically aligned. |
|
false |
Vertical Align Single Line Comments |
Controls whether single line comments are vertically aligned. |
|
false |
Vertical Alignment Tokens |
List of tokens used for splitting lines in the same scope in vertically aligned columns. |
|
|
Line Wrapping |
|||
Enable Line Wrapping |
Controls whether to enable line wrapping. |
|
false |
Line Width |
Number of characters on a line after wrapping the line. |
|
80 |
Wrap Multi Line Comments |
Controls whether multi-line comments are wrapped. |
|
false |
Wrap Single Line Comments |
Controls whether single line comments are wrapped and moved above the code. |
|
false |