Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have recently started using Sublime Text 2 after getting tired with Notepad++. Now, if I wanted to set what language I am currently programming in in Notepad++, I would go to the Language menu, and select whichever language I wanted. But in Sublime, the only way I have found out how to do that is to save the file in the file format of the language, and then all the colouring and other syntax helpers are loaded. So, is there any way I can change the language I am writing in without saving? If so, how?

This is mainly because I want to play around with test scripts which don't need saving.

share|improve this question
up vote 35 down vote accepted

Click the Plain Text label at the bottom right of the window and select your language.

Plain Text syntax highlighting screenshot

Java syntax highlighting screenshot

Alternatively, select your language in the menu at View » Syntax, or open your command palette (CtrlShiftP) and type ssjava (equals to Set Syntax: Java).

share|improve this answer
FACEPALM! Sorry, I should have noticed that sooner. In my classic working environment at the moment, I have VLC in the bottom right corner of the screen watching whatever tv series has tickled my fancy. Did not see that at all – topherg Jul 21 '13 at 18:32
@cgoddard If you're on OS X, there's an easy way to find menu items with certain labels as well -- in this case, a search for a language name showed me where the language menu items are. – Daniel Beck Jul 21 '13 at 18:37
@cgoddard The command palette can also be easily used to change the syntax; see my update on Daniel's answer. – slhck Jul 21 '13 at 19:32
Is it possible to set one by default? – Vandervals Jul 1 '15 at 8:14

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.