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 |
---|---|---|---|
Capitalization |
|||
Attributes |
Controls the attributes capitalization: Leave as is (1), All upper case (2), All lower case (3). |
|
“Leave as is” |
Data Types |
Controls the data types capitalization: Leave as is, All upper case, All lower case. |
|
“Leave as is” |
Keywords |
Controls the keywords capitalization: Leave as is, All upper case, All lower case. |
|
“Leave as is” |
Whitespace |
|||
Add Whitespace After |
List of tokens after which whitespace will be added. |
|
[] |
Add Whitespace Before |
List of tokens before which whitespace will be added. |
|
[] |
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 |
Insert spaces |
Insert spaces when pressing tab. |
|
true |
Tab width |
Controls the size of a tab in spaces. |
|
4 |
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 |
|||
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 |
Enable More Parameters Per Line If Less Than |
Controls whether to place parameters on the same line when their number does not exceed a certain value and the Parameters preference is set to One per line (open parenthesis on the same line) or One per line (open parenthesis on the next line). |
|
false |
Indent Multi Line Comments |
Controls whether to indent multi-line comments. |
|
true |
Ignore Lines Starting With |
List of line prefixes matching lines that will be ignored while indenting. |
|
[] |
More Parameters Per Line If Less Than |
Maximum number of parameters that can appear on a line when Enable More Parameters Per Line If Less Than is enabled. |
|
5 |
No Indent Keywords |
Selection of language keywords that will not increase indentation. |
|
|
Parameters |
Controls the placement of port, generic, map, function and procedure elements: Leave as is, One per line (open parenthesis on the same line), One per line (open parenthesis on the next line), More per line. |
|
“Leave as is” |
Then |
Controls the placement of |
|
“Leave as is” |
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 Patterns |
Vertically align code using patterns: Constant Declarations, Port Declarations, Record Declarations, Signal Declarations, Variable Declarations, Variable, Signal, Constant Declarations. |
|
|
Vertical Align Single Line Comments |
Controls whether single line comments are vertically aligned. |
|
false |
Vertical Align To Open Parenthesis |
Controls whether to vertically align relative to open parenthesis. |
|
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 |