Setting the Language of a Visual Studio Code File without Saving

1 Comment

Ever use Visual Studio Code and want to set the language of a file without having to save it?

Let’s say we have copied some code from somewhere, or we are creating a new file from scratch. Below I have some JavaScript in a file, and the code is all the same color, i.e. VS Code has not recognized this file as JavaScript:

To change the language of the file, in the bottom right, select Plain Text. This will open the Select Language Mode bar:

In selecting JavaScript, the file is now recognized:

Alternatively, press ALT+SHIFT+P to bring up the Language Mode settings and do the same thing.

 

THANKS FOR READING. BEFORE YOU LEAVE, I NEED YOUR HELP.
 

I AM SPENDING MORE TIME THESE DAYS CREATING YOUTUBE VIDEOS TO HELP PEOPLE LEARN THE MICROSOFT POWER PLATFORM.

IF YOU WOULD LIKE TO SEE HOW I BUILD APPS, OR FIND SOMETHING USEFUL READING MY BLOG, I WOULD REALLY APPRECIATE YOU SUBSCRIBING TO MY YOUTUBE CHANNEL.

THANK YOU, AND LET'S KEEP LEARNING TOGETHER.

CARL

https://www.youtube.com/carldesouza

 

ABOUT CARL DE SOUZA

Carl de Souza is a developer and architect focusing on Microsoft Dynamics 365, Power BI, Azure, and AI.

carldesouza.comLinkedIn Twitter | YouTube

 

One Response to Setting the Language of a Visual Studio Code File without Saving

Leave a Reply

Your email address will not be published. Required fields are marked *