So, don't know the technical phrase for typing one set of quotes and getting the other. " becomes "".
But, I'd like to type two graves (``) and have it become (``"), and turn off the " to "". I'll even accept one ` to become ``".
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.
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@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@lists.macromates.com http://lists.macromates.com/listinfo/textmate
On 11 Nov 2010, at 18:37, Ben Wilson wrote:
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...
You're not writing it in LaTeX are you? That uses the same quoting method, though I do have to hit ` twice to get ``'' and the cursor between.
You might want to create your own bundle and dig those quotes out of either the LaTeX or TeX bundles and add them to yours.
Looking further, it your document type is LaTeX and you hit Ctrl+` that wraps a selection in double quotes. Some interesting stuff in there.
Thanks. I'll give that a go.
I did get something to work; but I expect it to be messy. I added a snippet that turns a single double quote (one double quote) and expands to ``". This is working with my novel writing.
I'm writing in Markdown...but I wrote a Ruby gem that provides rake commands that converts the Markdown into LaTeX, then compiles using pdflatex. I'm in NaNoWriMo, and agumenting my rake tasks as appropriate, and will later improve the gem then create a bundle that implements those tasks. I'm happy in the terminal world (CLI and vim); though TextMate is a close 2d.
I have to say, though, when I occasionally switch to vim, I'm reminded why it's been my preferred editor for a decade. This is not a detraction to TextMate. They say to become an expert you need to spend 10,000+ hours practicing/using. Assuming 1/2 my professional time was in vim, that's just about 10,000 hours; but then I have countless weekends pounding away. So, I'll say I have around 15,000 hours in vim, and probably 200 in TextMate. And, I know it's not fair to compare with that much of a skill discrepancy.
On Mon, Nov 15, 2010 at 11:57 AM, Justin Catterall 100621.1@masonsmusic.co.uk wrote:
On 11 Nov 2010, at 18:37, Ben Wilson wrote:
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...
You're not writing it in LaTeX are you? That uses the same quoting method, though I do have to hit ` twice to get ``'' and the cursor between.
You might want to create your own bundle and dig those quotes out of either the LaTeX or TeX bundles and add them to yours.
Looking further, it your document type is LaTeX and you hit Ctrl+` that wraps a selection in double quotes. Some interesting stuff in there.
-- Justin C, by the sea.
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate