From: Kevin Rodgers <kevin.d.rodgers@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: putting double quotes efficiently
Date: Tue, 04 Jun 2013 08:52:26 -0600 [thread overview]
Message-ID: <kokut6$84j$1@ger.gmane.org> (raw)
In-Reply-To: <878v2r19dy.fsf@panda.goosenet.in>
On 6/3/13 9:50 AM, Udyant Wig wrote:
> You might also try keyboard macros.
>
> Here's how I'd do it:
>
> 0. Move point to the first line (anywhere will do).
>
> print _!_line1
> print linetwo
> print line3
>
> 1. Press C-x ( to begin recording a keyboard macro
>
> 2. Press C-a to move to the beginning of the line
>
> _!_print line1
> print linetwo
> print line3
>
...
> 9. Press C-x ) to finish recording the keyboard macro
>
> 10. Press C-x e to repeat the keyboard macro
>
> print "line1";
> print "linetwo";
> print line3_!_
>
> 11. You can now simply press `e' to repeat
>
> print "line1";
> print "linetwo";
> print "line3";
Or: Mark the remaining lines you want to change and `C-x C-k r'
(apply-macro-to-region-lines).
If you plan on doing that, you can move point to the beginning of the line
before starting the keyboard macro definition and leave C-a out of the macro
(because `C-x C-k r' will move to the beginning of each line automatically).
--
Kevin Rodgers
Denver, Colorado, USA
next prev parent reply other threads:[~2013-06-04 14:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.910.1370238187.22516.help-gnu-emacs@gnu.org>
2013-06-03 15:50 ` putting double quotes efficiently Udyant Wig
2013-06-04 14:52 ` Kevin Rodgers [this message]
2013-06-03 17:39 ` Joost Kremers
2013-06-04 12:21 ` C K Kashyap
2013-06-04 12:21 ` C K Kashyap
2013-06-03 5:43 C K Kashyap
2013-06-03 7:26 ` Andreas Röhler
2013-06-03 7:55 ` Andreas Röhler
2013-06-03 8:03 ` C K Kashyap
2013-06-03 9:10 ` Andreas Röhler
2013-06-03 11:52 ` C K Kashyap
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='kokut6$84j$1@ger.gmane.org' \
--to=kevin.d.rodgers@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.