[TxMt] "Unbinding" a menu command in TextMate
Dan Lowe
dan at tangledhelix.com
Tue Jul 31 17:43:37 UTC 2007
On Jul 31, 2007, at 1:32 PM, Kenneth McDonald wrote:
> Recently, I needed to unbind a TextMate menu command (Text:Reformat
> and Justify) so that I could use ^J for my own uses. Ale Munoz (the
> n is suppose to have a tilde above it but I don't know how to type
> that on a US keyboard, sorry) was kind enough to show me how to use
> the Mouse and Keyboard preferences panel to rebind that menu item
> to something else, which solves the immediate problem. However,
> this still begs the question; is there a way to _unbind_ that menu
> item, so that it has _no_ associated key binding? This can't be
> done using Ale's method.
I'm not sure you can do that, but you can certainly bind a key to a
command that doesn't do anything. For instance you could create a
command like this...
Save: Nothing
Input: None
Output: Discard
Key Equivalent: ^J
Scope Selector: (leave blank, so it works in all scopes, or enter a
scope if you want)
Command(s):
#!/bin/sh
exit
Then whenever you hit ^J, it will run this shell script that doesn't
do anything. It's not the most elegant thing but it should do what
you want, which is to make ^J have no consequence.
Ale's method was using the system keyboard mapping to rebind to items
in the menu. But in TextMate specifically, if you create a keybinding
in the bundle editor, it will override the bindings in the menus, so
you can use this method to override with a new action, or neuter a
keybinding as shown above.
Also, you can type ñ with this sequence: Option-n, n
HTH,
-dan
More information about the textmate
mailing list