I'm a long time visual studio developer and am stating with VS Code.
I found the Format Code shortcut (Shift + Alt + F) but I want it to run automatically whenever I press ;
. Is there a configuration for that?
VS Code Auto Format On SaveOpen Visual Studio Code editor. Click the “Settings” gear icon in the bottom-left corner. Search “Formatter” and click the “Editor: Default Formatter” option. From the drop-down menu, select whichever code formatter you want to use.
In the default configuration for Visual Studio Code, the command can be run using the shortcut Alt+Shift+F. To format a range, in an already opened project, open the document that you want to modify, select the specific range to format, right-click, and select Format Selection.
You can choose one of the below 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 option to execute the command whenever you press ;
. You can set a keyboard shortcut, but I guess you're not able to write ;
anymore then :D
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With