If you are new to Microsoft Visual Studio Code IDE (popularly called as VS Code) and wondering how to format or indent your source code, then here are the keyboard shortcuts that you can make use of,
For Windows:
If you are using VS Code on a device that runs Windows Operating System then the keyboard short cut is: Shift + Alt + F
For macOS:
If you are using VS Code on a device that runs Apple devices running macOS then the keyboard short cut is: Shift + Option + F
For macOS:
If you are using VS Code on a device that runs on Linux such as Ubuntu then the keyboard short cut is: Ctrl + Shift + I
⛏️ If you want to make use of your mouse, the simplest way to format your code is to right click anywhere in your source code file and select option - "Format Document", you can also check what the keyboard shortcut is by looking next to it just in case you forget it :)
This keyboard shortcuts remains the same irrespective of the programming language you are working on Java, JavaScript, Vue, Python etc.
Provide Feedback For This Article
We take your feedback seriously and use it to improve our content. Thank you for helping us serve you better!
😊 Thanks for your time, your feedback has been registered!
Comments & Discussion
Facing issues? Have questions? Post them here! We're happy to help!