Automatic code format in VSCODE
2 answers
You can choose one of the following options
"editor.formatOnType": false,
"editor.formatOnPaste": false,
"editor.formatOnSave": false
Or create a custom keyboard shortcut by editing editor.action.formatDocument
. But I AFAIK there is no way to execute the command whenever you click ;
. You can set the keyboard shortcut, but I guess you can't write anymore ;
: D
+5
source to share
To open User and Workspace Options , use the following VS Code menu command:
On Windows / Linux - File> Preferences> Preferences
On macOS - Code> Preferences> Preferences
Add these parameters to the editable configuration options panel:
"editor.formatOnPaste": true,
"editor.formatOnSave": true
0
source to share