In the bottom of my TextMate window I have a list of languages I can select by using the mouse or hotkeys. For some reason PHP does not have a hotkey associated with it, and I can't figure out where to set it. I've looked through the bundle editor without much luck.

How can I set a shortcut key for selecting the PHP language in TextMate?

enter image description here

link|improve this question

1  
These almost seem to be hardcoded, since there's no documentation on how to set keyboard shortcuts for custom language definitions. Weird that they would choose Perl over PHP, actually. Might be possible by some ugly User Interface scripting though. – slhck Jan 21 at 21:49
Did you look at the other shortcuts? P is bound to 4 languages, R to 4, S to 2… adding a 5th language to P would only make the shortcut even less useful than it is. Anyway, PHP is automatically selected for PHP files, what kind of files are you working with? – romainl Jan 22 at 6:55
1) I didn't ask how to set it to "P" ;) 2) When you create a new file it would be nice to be able to set the language with a shortcut key before saving - or perhaps I don't even want to save it as a file - but I do want syntax highlighting. 3) Keyboard shortcuts with the same letter give you the 1-x menu which I don't really find to be that much of an extra step. – cwd Jan 22 at 7:23
Sorry, I was too lazy to type the whole shortcut. – romainl Jan 23 at 7:57
feedback

1 Answer

up vote 2 down vote accepted

if there is no way to change it in the interface perhaps it is hard coded as slhck mentioned...

but take a look at

/Applications/TextMate.app/Contents/SharedSupport/Bundles/Perl.tmbundle/Syntaxes/Perl.plist

...and u will find...

Picture 12.png

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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