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.


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).

  • 1
    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
  • 1
    @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
  • 2
    @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
  • 1
    Is it possible to set one by default? – Vandervals Jul 1 '15 at 8:14

In Menu. View -> Sintax. And chose the language that you need like Notepad++

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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