Search This Blog

Set Visual Studio Code (VS Code) Default Language Mode When New File Opened

Visual Studio Code is my default PowerShell script editor. It is free and available in Windows, macOS, and Linux.

By default, it uses text as the script language when a new file is opened. To make it recognize the PowerShell cmdlet, I have to manually change the language mode (press F1, type Change Language Mode, then select PowerShell form the list of the language) or first save to the file to ps1. This becomes inconvenience overtime.

Luckily, a new setting “files.defaultLanguage” is added. I didn’t backtrack when this setting was added. It’s available in the current release 1.14.0 as of this writing.

To configure the default language setting,

  • Open File, Preferences, Settings
  • Add the following to set PowerShell as the default language mode
    • “files.defaultLanguage": "powershell",
  • Save the setting.json file

To set other supported languages as the default

  • Delete “powershell” in the line
  • Press Ctrl + Spacebar to select the option from the list

1 comment:

  1. Eddie'S Blog: Set Visual Studio Code (Vs Code) Default Language Mode When New File Opened >>>>> Download Now

    >>>>> Download Full

    Eddie'S Blog: Set Visual Studio Code (Vs Code) Default Language Mode When New File Opened >>>>> Download LINK

    >>>>> Download Now

    Eddie'S Blog: Set Visual Studio Code (Vs Code) Default Language Mode When New File Opened >>>>> Download Full

    >>>>> Download LINK l9

    ReplyDelete

Use WinSCP to Transfer Files in vCSA 6.7

This is a quick update on my previous post “ Use WinSCP to Transfer Files in vCSA 6.5 ”. When I try the same SFTP server setting in vCSA 6.7...