VS Code Keyboard Shortcuts/Change file language mode

Set syntax highlighting / language mode manually.

Section: Editor Editing

Change file language mode

text
text
Windows/Linux: Ctrl+K M
macOS: Cmd+K M

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Editor Editing
Copy line up/down
Duplicate current line or selection.
OpenIn sheettextsame section
Join lines
Join selected lines or current line with next line.
OpenIn sheettextsame section
Trim trailing whitespace
Remove trailing spaces in active file.
OpenIn sheettextsame section
Toggle word wrap
Switch editor wrapping on and off.
OpenIn sheettextsame section
New window
Open a new VS Code window.
Quick Open
Search and open files.