Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

RE: RE: Editor tricks.

by nuance (Hermit)
on Sep 30, 2000 at 01:37 UTC ( #34693=note: print w/replies, xml ) Need Help??

in reply to RE: Editor tricks.
in thread Editor tricks.

vi and emacs both have named registers that you can use to store and recall text. I don't know how to use vi but I know they're there.

  • emacs does really beautiful rectangle cuts and pastes.
  • emacs does cuts, copies and appends to regisers.
  • emacs does cuts copies and appends to other buffers.
  • emacs lets you treat a register as a variable that you can increment and decremt and use it's value in keyboard macros.
  • emacs lets you write extra functions in lisp (if you want to)
  • emacs lets you record keyboard macros. either one time quick hacks or you can name them and bind them to a key. just for this session or make them permenant.
emacs does lots of other wonderful things that I can't/haven't figured out how to do in vi. emacs figures out the line ending and uses it transparently, if it gets it wrong you can override it.


Replies are listed 'Best First'.
RE: RE: RE: Editor tricks.
by Petruchio (Vicar) on Sep 30, 2000 at 13:35 UTC
    nuance: "vi and emacs both have named registers that you can use to store and recall text. I don't know how to use vi but I know they're there."

    Hitting the double quote in command mode tells vi that the next letter you enter is going to be the name of the buffer that you'll be refering to. For instance:


    will cut everything from the cursor to the end of the line, and throw it in buffer a. To paste it in again, you'd say:


    The :map command binds a key to a macro... like so:

    :map q xp

    which will make the q key cut the letter the cursor's presently on and paste it after the next one, effectively transposing them.

    Some of the other things you mention make me think. It's about time I went back and learned some more stuff, to make my editing more pleasant. It's easy to just roll along after a certain point, using what you know.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://34693]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2022-01-22 15:43 GMT
Find Nodes?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:

    Results (63 votes). Check out past polls.