Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

RE: Editor tricks.

by Corion (Patriarch)
on Sep 29, 2000 at 17:22 UTC ( #34592=note: print w/replies, xml ) Need Help??

in reply to Editor tricks.

First of all, an editor needs a clipboard. I've learned the necessary tricks for Windows, pico and vi :

  • For Windows, it's CTRL-C, CTRL-V and CTRL-X
  • For pico, it's CTRL-K to erase a line and CTRL-U to paste a set of lines
  • For vi, it's dd to erase a line and p to paste it.

The second nice-to-have thing is the ability to replay keystrokes. pico has no such capability, vi has limited capability by prefixing the number of repetitions to a single command, and the Borland IDEs and proton have that capability. notepad lacks that capability. D'oh.

Syntax highlighting is nice eye-candy that helps immensely when doing some TeX stuff. Both, proton and nedit do that.

Being able to read (and maybe write) both, Unix and DOS line endings is a sure plus, but not really necessary, as I can convert stuff using Perl anyway.

Replies are listed 'Best First'.
RE: RE: Editor tricks.
by nuance (Hermit) on Sep 30, 2000 at 01:37 UTC
    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: "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://34592]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2022-05-21 18:03 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (77 votes). Check out past polls.