Lost syntax highlighting in Textmate

Using Textmate, I somehow managed to turn off syntax highlighting for php files. After much trial and error, I found out that this happened when I accidentally hit SHIFT-CTRL-OPTION-D (I'm on a Mac, by the way). I watched and tried a lot of keyboard shortcuts everywhere, but I can't figure out how to turn on the beautiful syntax highlighting again. Please help me, Textmate guru, you are my only hope!

+6
source share
2 answers

The key sequence SHIFT-CTRL-OPTION-D corresponds to the option in the language menu down in the lower left corner of the Textmate window. The language menu tells Textmate in which language the file should be viewed so that it can determine the correct syntax highlighting. The sequence of keys that I pressed made Textmate highlight my text as if it were a diff window. Switched it back to PHP, and now it works great.

+11
source

I do not have enough comments to add a comment, so I will talk about the accepted answer here.

SHIFT+CONTROL+OPTION+<LETTER> displays a menu displaying all grammars starting with <LETTER> . Therefore, if you want to return PHP, just press SHIFT+CONTRL+OPTION+P , and then a list of languages ​​starting with "P" will appear. You can select one from the list by clicking the corresponding number (on my computer, it is 2 ).

+7
source

All Articles