Does textmate have an equivalent to emacs query replace that takes
term to search for, what to replace it with and then steps through each match and asks if you want to replace or not ( moving view obviously to that area so you can view the code around it )
?
On 3/21/08, Sean Allen sean@ardishealth.com wrote:
Does textmate have an equivalent to emacs query replace that takes
term to search for, what to replace it with and then steps through each match and asks if you want to replace or not ( moving view obviously to that area so you can view the code around it )
Sure, the Find dialog box (which is actually also the Find/Replace dialog) has buttons to:
Find the next (or previous) occurrence of the search test/regex Replace what it found or Replace what it found and find the next occurrence.
On 3/21/08, Rick DeNatale rick.denatale@gmail.com wrote:
On 3/21/08, Sean Allen sean@ardishealth.com wrote:
Does textmate have an equivalent to emacs query replace that takes
term to search for, what to replace it with and then steps through each match and asks if you want to replace or not ( moving view obviously to that area so you can view the code around it )
Sure, the Find dialog box (which is actually also the Find/Replace dialog) has buttons to:
Find the next (or previous) occurrence of the search test/regex Replace what it found or Replace what it found and find the next occurrence.
I stopped too soon.
You can also do this with keystrokes.
Cmd-E makes the selection the search text Cmd-Shift-E makes the selection the replacement text Cmd-G searches forward, Cmd-Shift-G searches backward Alt-Cmd-F replaces and finds next.
Rick DeNatale <rick.denatale@...> writes:
You can also do this with keystrokes.
Cmd-E makes the selection the search text Cmd-Shift-E makes the selection the replacement text Cmd-G searches forward, Cmd-Shift-G searches backward Alt-Cmd-F replaces and finds next.
And don't forget:
Cmd-Ctrl-F to replace all Cmd-Ctrl-Shift-F to replace all in the current selection
I use the latter all the time together with Cmd-E and Cmd-Shift-E.
Andrew
On Mar 21, 2008, at 10:09 AM, Rick DeNatale wrote:
On 3/21/08, Rick DeNatale rick.denatale@gmail.com wrote:
On 3/21/08, Sean Allen sean@ardishealth.com wrote:
Does textmate have an equivalent to emacs query replace that takes
term to search for, what to replace it with and then steps through each match and asks if you want to replace or not ( moving view obviously to that area so you can view the code around it )
Sure, the Find dialog box (which is actually also the Find/Replace dialog) has buttons to:
Find the next (or previous) occurrence of the search test/regex Replace what it found or Replace what it found and find the next occurrence.
I stopped too soon.
You can also do this with keystrokes.
Cmd-E makes the selection the search text Cmd-Shift-E makes the selection the replacement text Cmd-G searches forward, Cmd-Shift-G searches backward Alt-Cmd-F replaces and finds next.
What is the the keystroke command to just move to the next result, ie keystroke that corresponds to the next button...
On 3/21/08, Sean Allen sean@ardishealth.com wrote:
What is the the keystroke command to just move to the next result, ie keystroke that corresponds to the next button...
Cmd-G
On Mar 21, 2008, at 11:58 AM, Rick DeNatale wrote:
On 3/21/08, Sean Allen sean@ardishealth.com wrote:
What is the the keystroke command to just move to the next result, ie keystroke that corresponds to the next button...
Cmd-G
well i just had some weirdness.
cmd-g and the find next in menu were bringing up the find dialog like i've been experiencing. i restarted textmate and now it works.