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.

DVT.textEditor.eLanguage.formatting.whitespace.compactWhitespaceGroups

false

Compact Consecutive Empty Lines

Controls whether to compact consecutive empty lines.

DVT.textEditor.eLanguage.formatting.whitespace.compactConsecutiveEmptyLines

false

Maximum Number Of Consecutive Empty Lines

Maximum number of consecutive empty lines that can appear in a file.

DVT.textEditor.eLanguage.formatting.whitespace.maximumNumberOfConsecutiveEmptyLines

1

Trim End of Line Whitespace

Controls whether to trim end of line whitespaces.

DVT.textEditor.eLanguage.formatting.whitespace.trimEndOfLineWhitespace

true

Trim Whitespace Lines

Controls whether to trim lines containing only whitespaces.

DVT.textEditor.eLanguage.formatting.whitespace.trimWhitespaceLines

true

Indentation

{

Controls the placement of {: Leave as is, On a new line, On the same line

DVT.textEditor.eLanguage.formatting.indentation.curly

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.

DVT.textEditor.eLanguage.formatting.indentation.doNotIndentSingleLineCommentsAtBeginningOfLine

true

Ignore Lines Starting With

List of line prefixes matching lines that will be ignored while indenting.

DVT.textEditor.eLanguage.formatting.indentation.ignoreLinesStartingWith

[]

Insert spaces

Insert spaces when pressing tab.

editor.insertSpaces

true

Tab width

Controls the size of a tab in spaces.

editor.tabSize

4

Vertical Alignment

Enable Vertical Align

Controls whether to enable vertical alignment.

DVT.textEditor.eLanguage.formatting.verticalAlignment.enableVerticalAlignment

false

Only Consecutive Lines

When enabled, only consecutive lines (lines that follow each other or are separated by comment lines) are vertically aligned.

DVT.textEditor.eLanguage.formatting.verticalAlignment.onlyConsecutiveLines

false

Vertical Align Single Line Comments

Controls whether single line comments are vertically aligned.

DVT.textEditor.eLanguage.formatting.verticalAlignment.verticalAlignSingleLineComments

false

Vertical Alignment Tokens

List of tokens used for splitting lines in the same scope in vertically aligned columns.

DVT.textEditor.eLanguage.formatting.verticalAlignment.verticalAlignTokens

["=", "=="]

Line Wrapping

Enable Line Wrapping

Controls whether to enable line wrapping.

DVT.textEditor.eLanguage.formatting.lineWrapping.enableLineWrapping

false

Line Width

Number of characters on a line after wrapping the line.

DVT.textEditor.eLanguage.formatting.lineWrapping.lineWidth

80

Wrap Multi Line Comments

Controls whether multi-line comments are wrapped.

DVT.textEditor.eLanguage.formatting.lineWrapping.wrapMultiLineComments

false

Wrap Single Line Comments

Controls whether single line comments are wrapped and moved above the code.

DVT.textEditor.eLanguage.formatting.lineWrapping.wrapSingleLineComments

false