Hi there! Find and replace in 1.1b5-- search for \t, replace with \s, regex box checked, looking in selected text. I got "s" instead of space: 3 Union Street 3sUnionsStreet Thanks for your patience!
P.S. How do I type 3<tab> without having it become <h3></h3>? The bundle editor didn't reveal any clues.
Cheers,
Dameron
On Mar 30, 2005, at 8:35 PM, Dameron Midgette wrote:
Hi there! Find and replace in 1.1b5-- search for \t, replace with \s, regex box checked, looking in selected text. I got "s" instead of space: 3 Union Street 3sUnionsStreet Thanks for your patience!
why use \s instead of " ", i.e. just a space?
P.S. How do I type 3<tab> without having it become <h3></h3>? The bundle editor didn't reveal any clues.
Doesn't happen to me. what type of file are you editing?
Cheers, Dameron
Haris
Find and replace in 1.1b5-- search for \t, replace with \s, regex
box checked, looking in selected text. I got "s" instead of space: 3 Union Street 3sUnionsStreet
I think you've misunderstood the regex characters: \s means "any single horizontal whitespace character", such as a tab or a space. You can't use this as a replacement character (it's *not* a character), just use a literal space instead. (ie, just type in a space for the replacement character.)
Cheers, Paul
[[I have no idea re the <H3> </H3> thing: entering "3" then a tab produces a 3 followed by a tab for me!]]
Hi there! Thanks all of you, for your help... XHTML has the hN mapped to snippets, just had to dig farther. As for the \s space thing, it's clear now, but a bit inconsistent (or newbie confusing?). The find field works as expected, but replace accepts \t and \n, but not \s. (haven't checked others) I assumed they all would (started with \t), and forgot about my assumption. Perhaps the unambiguous (\t,\s,\n, etc. labeled "General Escape Codes" in the help files) markers could all work? IMHO, that would be more consistent.
Cheers,
Dameron On Mar 30, 2005, at 9:48 PM, Paul McCann wrote:
Find and replace in 1.1b5-- search for \t, replace with \s, regex
box checked, looking in selected text. I got "s" instead of space: 3 Union Street 3sUnionsStreet
I think you've misunderstood the regex characters: \s means "any single horizontal whitespace character", such as a tab or a space. You can't use this as a replacement character (it's *not* a character), just use a literal space instead. (ie, just type in a space for the replacement character.)
Cheers, Paul
[[I have no idea re the <H3> </H3> thing: entering "3" then a tab produces a 3 followed by a tab for me!]]
On Mar 31, 2005, at 9:50 AM, Dameron Midgette wrote:
Hi there! Thanks all of you, for your help... XHTML has the hN mapped to snippets, just had to dig farther. As for the \s space thing, it's clear now, but a bit inconsistent (or newbie confusing?). The find field works as expected, but replace accepts \t and \n, but not \s. (haven't checked others) I assumed they all would (started with \t), and forgot about my assumption. Perhaps the unambiguous (\t,\s,\n, etc. labeled "General Escape Codes" in the help files) markers could all work? IMHO, that would be more consistent.
As someone already pointed out, \s would match both a tab and a regular space, so it would not be so clear which of them you would want to use in the replace part, hence you are not allowed to be ambiguous like that :-)
Cheers, Dameron
On Mar 30, 2005, at 9:48 PM, Paul McCann wrote:
Find and replace in 1.1b5-- search for \t, replace with \s,
regex box checked, looking in selected text. I got "s" instead of space: 3 Union Street 3sUnionsStreet
I think you've misunderstood the regex characters: \s means "any single horizontal whitespace character", such as a tab or a space. You can't use this as a replacement character (it's *not* a character), just use a literal space instead. (ie, just type in a space for the replacement character.)
Cheers, Paul
[[I have no idea re the <H3> </H3> thing: entering "3" then a tab produces a 3 followed by a tab for me!]]
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
Haris
Hi! Ooops, my bad. Yes, that has been mentioned, and \s is *not* in the "General Codes" section of the help. If only consistency of *perception* (mine) were easier....<sigh/> Cheers,
Dameron On Mar 31, 2005, at 5:22 PM, Charilaos Skiadas wrote:
As someone already pointed out, \s would match both a tab and a regular space, so it would not be so clear which of them you would want to use in the replace part, hence you are not allowed to be ambiguous like that :-)
On 31 Mar 2005, at 03:35, Dameron Midgette wrote:
P.S. How do I type 3<tab> without having it become <h3></h3>? The bundle editor didn't reveal any clues.
You most likely have a HTML <h3> snippet in the HTML bundle that has a 3 as it's tab trigger. Either change this tab trigger to h3 or empty or whatever, or disable the HTML bundle if you're not using it.
A newer HTML bundle is on the way and the tab triggers for <hN> will be hN (n=number). Secondly, the next (?) beta version of TM will introduce scopes so that if you're working in HTML syntax h3[tab] will produce <h3></h3> whereas in any other syntax it won't.
Hope that helped you. Any further problems like this, just look through the bundles Snippets/Commands/Macros to see which item causes the behaviour.
Kind regards,
Mats
---- "TextMate, coding with an incredible sense of joy and ease" - www.macromates.com -