Resources
Interested in how we can improve your customer and employee engagement?
Contact us for a free assessment ►

Powered by LUCK™

How to Format Code in Visual Studio Code

Microsoft 365, SharePoint, Teams

Powered by LUCK™

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

For those who don’t identify as a “developer,” we need an IDE (Integrated Development Environment) tool to look at our HTML, CSS, JavaScript, PowerShell, etc. code. The decision is based on personal preference; some people use Notepad, Notepad++, PowerShell ISE (PowerShell only)…etc. depending on the level of comfort or familiarity with each.

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!

Search Posts

Categories

Recent Posts