Sometimes I am writing code, and I need to go back and quote something...
foo=$this/$that/$other
What I wanted was this: foo="$this/$that/$other"
What I end up with is this foo=""$this/$that/$other
How do I prevent that, I know I can delete one, but it sometimes gets strange, and puts another one back in, or other oddness. It is really rough when you are in the middle of a regex string, and it starts messing with you.
Thanks -- Scott
On 03/03/2009, at 7:28 PM, Scott Haneda wrote:
Sometimes I am writing code, and I need to go back and quote something...
foo=$this/$that/$other
What I wanted was this: foo="$this/$that/$other"
What I end up with is this foo=""$this/$that/$other
How do I prevent that, I know I can delete one, but it sometimes gets strange, and puts another one back in, or other oddness. It is really rough when you are in the middle of a regex string, and it starts messing with you.
You can uncheck the Auto-pair characters preference under Text Editing in preferences.
Adam
On 03.03.2009, at 10:30, Adam Bryzak wrote:
On 03/03/2009, at 7:28 PM, Scott Haneda wrote:
Sometimes I am writing code, and I need to go back and quote something...
foo=$this/$that/$other
What I wanted was this: foo="$this/$that/$other"
What I end up with is this foo=""$this/$that/$other
Maybe this: Select $this/$that/$other and press "
--Hans
On Mar 3, 2009, at 1:34 AM, Hans-Jörg Bibiko wrote:
On 03.03.2009, at 10:30, Adam Bryzak wrote:
On 03/03/2009, at 7:28 PM, Scott Haneda wrote:
Sometimes I am writing code, and I need to go back and quote something...
foo=$this/$that/$other
What I wanted was this: foo="$this/$that/$other"
What I end up with is this foo=""$this/$that/$other
Maybe this: Select $this/$that/$other and press "
Well that is certainly handy to know, thanks. Is there any modifier key to hold that will turn off the character pairing for the moment? -- Scott
On 3 Mar 2009, at 10:37, Scott Haneda wrote:
[...] Well that is certainly handy to know, thanks. Is there any modifier key to hold that will turn off the character pairing for the moment?
No, but you can make a snippet on ⌥" which only inserts ".
Normally TM disables pairing when the character to the right of the caret is a word character, but as we still do not have scope-specific word characters, it does not perceive $ to be part of the word for your code — you can add it globally though (via Preferences).