[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: putting double quotes efficiently
From: |
Udyant Wig |
Subject: |
Re: putting double quotes efficiently |
Date: |
Mon, 03 Jun 2013 15:50:17 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) |
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
3. Press M-f to move forward a word
print _!_line1
print linetwo
print line3
4. Press " to insert one double-qoutes
print "_!_line1
print linetwo
print line3
5. There are two options here, any of which work fine:
5.0. Either, M-f again to move forward,
5.1. Or, C-e to move to the end of the line
print "line1_!_
print linetwo
print line3
6. Press " to insert the second double-quotes
print "line1"_!_
print linetwo
print line3
7. Press ; to insert the semi-colon
print "line1";_!_
print linetwo
print line3
8. Press C-n to move down a 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";
The above goes very quickly when actually typing.
The Info node (emacs)Keyboard Macros is the authoritative reference.
- Re: putting double quotes efficiently, (continued)
- Re: putting double quotes efficiently, C K Kashyap, 2013/06/03
- 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 <=
Re: putting double quotes efficiently, Joost Kremers, 2013/06/03