[TxMt] Re: escaping characters (in the document)

Jacob Rus jrus at hcs.harvard.edu
Wed Nov 29 21:17:48 UTC 2006


Rob McBroom wrote:
> For shell init scripts and various other purposes, I'd like to be able 
> to "type" characters like ⌃[ or ⌃G. You know, the kind of thing you 
> would precede with ⌃V in the Terminal. It seems that Cocoa has a key 
> binding for this (NSQuotedKeystrokeBinding, which is ⌃Q by default), but 
> it is used for another purpose in Textmate. Has the functionality been 
> remapped or do I need to try to define it for Textmate myself? It 
> doesn't seem to be set…

I'm pretty sure TextMate's text control doesn't support that, but you 
can try.

>     rob at kendra ~> defaults read com.macromates.Textmate 
> NSQuotedKeystrokeBinding
>     2006-11-29 14:47:10.910 defaults[6713]
>     The domain/default pair of (com.macromates.Textmate, 
> NSQuotedKeystrokeBinding) does not exist
> 
> On a related note, I'd like to be able to "see" these characters as 
> well, or perhaps toggle them of and on (with ⌥⌘I ideally). Texmate is 
> better than most Cocoa apps, as it seems to display a space in place of 
> such characters instead of nothing at all, but I'd like to know what 
> that space represents. Has anyone tried enabling 
> [NSTextShowsControlCharacters][] in Textmate? I'm guessing there would 
> be undesired side-effects.

Did you try showing invisibles?  I believe these show up as different 
from spaces or tabs, but I don't remember exactly what they look like.

In any case, you should be able to copy/paste them into a textmate 
control from another window, or make a command to insert them, something 
that takes the previous letter ("[" for instance), and turns it into the 
control sequence ("⌃[").

-Jacob




More information about the textmate mailing list