Q . How do you format code in Visual Studio Code (VSCode)?

Dev Singh. asked, Jul 07 ' 2017

In windows system it is done by pressing Shift + Alt + F
but How can I do the same in Ubuntu.

  • vscode
  • code-formatting

1 Answers

The code formatting is available in VS Code through the following shortcuts:

  • On Windows Shift + Alt + F
  • On Mac Shift + Option + F
  • On Ubuntu Ctrl + Shift + I

Alternatively, you can find the shortcut, as well as other shortcuts, through the search functionality provided in the editor with Ctrl +Shift+ P (or Command + Shift + P on Mac), and then searching for format document.


Source : https://stackoverflow.com/questions/29973357/how-do-you-format-code-in-visual-studio-code-vscode

Leave a Ansewer