I'm currently giving Visual Studio Code a try. Overall I like the user experience however I can't find some of the things I'm very much used to, in sublime (with the help of extensions.)
One of them is beautify code (or tidy up) - is there any way to do this for JavaScript in Visual Studio Code?
Any help is appreciated.
I'm currently giving Visual Studio Code a try. Overall I like the user experience however I can't find some of the things I'm very much used to, in sublime (with the help of extensions.)
One of them is beautify code (or tidy up) - is there any way to do this for JavaScript in Visual Studio Code?
Any help is appreciated.
Share Improve this question edited Aug 8, 2018 at 22:15 JasonMArcher 15k22 gold badges59 silver badges53 bronze badges asked Aug 16, 2015 at 18:12 MiaMia 6,54113 gold badges53 silver badges84 bronze badges2 Answers
Reset to default 6If you want to beautify the code, you can just press
Ctrl+Shift+P and type format code
or press Alt+Shift+F
It correctly indents my code so it seems like that is what you are looking for, if not you might want to give an example.
You can use the shortcuts to beautify the code in Visual Studio Code:
- On Windows: Shift + Alt + F
- On Mac: Shift + Option + F
- On Ubuntu: Ctrl + Shift + I
As per the Programming language (PHP, HTML, JavaScript, ASP, JSP, etc.) it will ask you to install a package, after installation you can use above shortcuts.