Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

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.

Nuance

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:

    "aD

    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:

    "ap

    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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2020-05-27 07:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (153 votes). Check out past polls.

    Notices?