[TxMt] Re: How to Handle Odd Quotes

Ben Wilson dausha at gmail.com
Thu Nov 11 18:37:56 UTC 2010


Thanks. I started by turning off the "Auto-Pair characters" in
Preferences. I'm writing a novel and am using ``dialog" to demark
dialog. So, I guess the next thing is a snippet...

On Wed, Nov 10, 2010 at 3:09 PM, Rob McBroom <mailinglist0 at skurfer.com> wrote:
> On Nov 10, 2010, at 12:46 PM, Ben Wilson wrote:
>
>> So, don't know the technical phrase for typing one set of quotes and
>> getting the other. " becomes "".
>
> TextMate calls them “smart typing pairs”. See 4.1 and 15.4 in the manual.
>
>> But, I'd like to type two graves (``) and have it become (``"), and
>> turn off the " to "". I'll even accept one ` to become ``".
>
> As far as I know, the typing pairs can only be triggered by a single character, and can only insert one character to the right of the cursor.
>
> Someone may have a better idea, but what I would do is create a snippet that inserts ``$1"$0 with ` as its tab trigger. So you'd type `⇥ and end up with the desired characters with the cursor in the middle waiting for you to keep typing. Tab again will take you outside the quotes (but so will →, ⌥⌘↩, ⌘↩, etc).
>
> If you want to turn off smart typing pairs entirely, it can be done in the preferences. To do it here and there or for only certain characters would be more difficult.
>
> --
> Rob McBroom
> <http://www.skurfer.com/>
>
>
> _______________________________________________
> textmate mailing list
> textmate at lists.macromates.com
> http://lists.macromates.com/listinfo/textmate



-- 
Ben Wilson
"We cannot determine the character or nature of a system within
itself. Efforts to do so will only generate confusion and disorder."
Boyd


More information about the textmate mailing list