I'm sure I'm not the only person out there still learning emacs.While cutting and pasting jjohn's 10-line code snippets to make the SOAP journal client (Don't waste an opportunity to learn! Examine and understand each piece before going on!) I wanted an easy way to delete the source code line numbers and associated spacing. In vi, I'm quite familiar with how I'd do that: 7x to delete 7 characters, followed by n, followed by dot to repeat. Unfortunately the same approach in emacs fails because the "repeat" command repeats the act of going to the next line.
With the help of a coworker and the documentation, I figured out
how to get what I wanted: c-x ( starts recording a keyboard macro,
then I hit c-a to go to the beginning of the current line (I'm writing
this macro defensively
Have you ever noticed that emacs is cool?
Oh, and, if you hadn't guessed, this is my first post from emacs with the new client. Thanks, Joe!
Addendum-- or, if I'd waited until the end of the article, I would
have learned that I could just download the program. But then I
wouldn't have learned this really cool emacs trick, would I? I might
look foolish at this point, but I'm satisfied.
or... (Score:1)
cursor down to the 7th row of the last line;
C-X r k to delete the characters (mnemonic: region-kill)
-DA [coder.com]
oops... (Score:1)
-DA [coder.com]
Re:or... (Score:1)
Re:or... (Score:2)
:) Sounds like emacs subscribes to Perl's TMTOWTDI philosophy.
J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers