If you use Microsoft’s Visual Studio Code, changing the code format may not be all that obvious. Here is a quick “how-to” to help you save time…
Visual Studio Code
If you live in the Microsoft world, like I do, you likely know about Visual Studio Code – a lightweight, but very powerful, IDE built from the ground up by Microsoft to leverage current code technology.
Visual Studio Code has support for various types of code that may be relevant to you, including a PowerShell console. One thing you will quickly run into is Visual Studio Code does not automatically format the code. The question remains, how do we do that?
How to Format Code
Let’s say you are trying to review the sample JSON to format columns in SharePoint Online. You paste the code and it’s formatted as plain text.
In the bottom right, click on “plain text.” You will see the formatting picker where you can choose your code type:
When you have your code open, click on “plain text” to properly format your code. You will get formatting, IntelliSense, and lots of other goodies.
I hope this helps save someone the confusion of searching through all of the top menus in vain. Please let us know how we can help you with your current technical struggles or business process pains!