Let's try and change it to Ctrl+k Ctrl+D

Step 1: In your Visual Studio Code windows, go to File->Preferences->Keyboard Shortcut

Media player for mac catalina. This will open two files beside each other like in the screenshot below:

Code

Step 2: Now, on the window on the right i.e. the keybindings.json file, you can define your own shortcut in the below format:

Vs Code Align Text

In the above code, we have defined that the set of keys, Ctrl+k Ctrl+D, will fulfill the command of formatting the code in the code editor.

Now both the commands, Ctrl+K Ctrl+Dand Shift+Alt+Fwork as code format keys in Visual Studio Code.

How To Align Code In Visual Studio Code

Hope this article, helped in making coding with Visual Studio Code easier.

nodejs,visual studio code,javascript
How
Opinions expressed by DZone contributors are their own.

Popular on DZone