help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: quick 'perform last replace again'


From: David Kastrup
Subject: Re: quick 'perform last replace again'
Date: Mon, 21 Apr 2008 13:49:42 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Phil Carmody <thefatphil_demunged@yahoo.co.uk> writes:

> Subject line seems to describe the question succinctly.
>
> I've been inserting some typedefs in some C code, and using 
> query-replace to turn uint8_t's into whatever_t's. However,
> I'm only changing a small proportion of each match, so it 
> became a drag. I'd rather just have the ability to move and 
> scroll around the file (so _not_ in query-replace mode), and 
> when I spot something that needs to be changed I'd like to 
> just move the cursor onto the line containing it, press some 
> magic key sequence, and have it replace either the first 
> (or all) instances of the most-recently-used match with the
> most-recently-used replacement on the current line. I do not
> want to be left in query-replace mode - I want to then 
> continue editing.

C-x ESC ESC RET

Do the replacement with . (which is bound to act-and-exit).

Or use just M-% RET (which uses the defaults) and then . for
act-and-exit.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum


reply via email to

[Prev in Thread] Current Thread [Next in Thread]