Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

1 Answer

up vote 5 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 –  cgoddard 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
1  
@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
add comment

Your Answer

 
discard

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.