[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: putting double quotes efficiently
From: |
Kevin Rodgers |
Subject: |
Re: putting double quotes efficiently |
Date: |
Tue, 04 Jun 2013 08:52:26 -0600 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.2.28) Gecko/20120306 Thunderbird/3.1.20 |
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
- narrowing considered harmful (was: putting double quotes efficiently), (continued)
- Message not available
- narrowing considered harmful (was: putting double quotes efficiently), Stefan Monnier, 2013/06/13
- Re: narrowing considered harmful, Leo Liu, 2013/06/13
- Re: narrowing considered harmful, Stefan Monnier, 2013/06/14
- Re: narrowing considered harmful, Leo Liu, 2013/06/14
- Re: narrowing considered harmful, Stefan Monnier, 2013/06/14
- Re: narrowing considered harmful, Leo Liu, 2013/06/16
- Re: narrowing considered harmful, Stefan Monnier, 2013/06/17
- RE: narrowing considered harmful, Drew Adams, 2013/06/17
- Re: narrowing considered harmful, Stefan Monnier, 2013/06/17
Re: putting double quotes efficiently, Udyant Wig, 2013/06/03
- Re: putting double quotes efficiently,
Kevin Rodgers <=
Re: putting double quotes efficiently, Joost Kremers, 2013/06/03