Stories
Slash Boxes
Comments

SoylentNews is people

posted by martyb on Tuesday October 24 2017, @07:28AM   Printer-friendly
from the what-about-emacs? dept.

It's an old article, but if you use vi/m it's always good to read a refresher. I've been using the editor for almost 30 years and always learn something new:

If you spend a lot of time typing plain text, writing programs or HTML, you can save much of that time by using a good editor and using it effectively. This paper will present guidelines and hints for doing your work more quickly and with fewer mistakes.

The open source text editor Vim (Vi IMproved) will be used here to present the ideas about effective editing, but they apply to other editors just as well. Choosing the right editor is actually the first step towards effective editing. The discussion about which editor is the best for you would take too much room and is avoided. If you don't know which editor to use or are dissatisfied with what you are currently using, give Vim a try; you won't be disappointed.

[...] The point is that you need to get to know these commands. You might object that you can't possibly learn all these commands - there are hundreds of different movement commands, some simple, some very clever - and it would take weeks of training to learn them all. Well, you don't need to; instead realize what your specific way of editing is, and learn only those commands that make your editing more effective.

There are three basic steps:

        1. While you are editing, keep an eye out for actions you repeat and/or spend quite a bit of time on.
        2. Find out if there is an editor command that will do this action quicker. Read the documentation, ask a friend, or look at how others do this.
        3. Train using the command. Do this until your fingers type it without thinking.


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 2) by bzipitidoo on Tuesday October 24 2017, @01:06PM (2 children)

    by bzipitidoo (4388) on Tuesday October 24 2017, @01:06PM (#586831) Journal

    Seeing the kinds of mistakes my elderly father makes has shown me that the standard of ctrl-x, ctrl-c, ctrl-v for cut, copy, and paste, and most of all ctrl-a for select all, is not very good. He's a sloppy typer, likely to get tired and accidentally brush the ctrl key. Instead of typing A, he will accidentally type ctrl-a. Then the next letter he types, no matter what it is, erases everything he just typed, and then he comes screaming to me for help because the computer just "lost" all his work. I can usually get it all back with ctrl-z. Took me a while to figure out what he was doing. Other times, he has accidentally minimized the window and thought it lost, or changed the focus and complained that the keyboard stopped working

    It occurred to me that as commands go, ctrl-a makes "replace all with a single character" way too easy. One rarely if ever wants to do that. Editing functionality ought to be changed to make it harder to do that by accident.

    Starting Score:    1  point
    Karma-Bonus Modifier   +1  

    Total Score:   2  
  • (Score: 2) by tangomargarine on Tuesday October 24 2017, @06:39PM

    by tangomargarine (667) on Tuesday October 24 2017, @06:39PM (#586990)

    Usually about once a day I accidentally end up typing Ctrl-Z in emacs and suspending the task. At least that one is easily fixed without loss of work.

    --
    "Is that really true?" "I just spent the last hour telling you to think for yourself! Didn't you hear anything I said?"
  • (Score: 2) by el_oscuro on Wednesday October 25 2017, @02:00AM

    by el_oscuro (1711) on Wednesday October 25 2017, @02:00AM (#587217)

    About a year after Microsoft started using that stupid "ribbon" in Office, I first encountered it on a project I was working on. After editing the document a bit, I wanted to... print it. With the ribbon, I couldn't actually figure it out, so I asked the sysadmin how to print it. He admitted he didn't know either, but suggested using CTRL-P, the old DOS shortcut to print it. These shortcuts work cross platform in almost all applications! Best time saver ever, and I never have to learn a new shitty GUI again!

    --
    SoylentNews is Bacon! [nueskes.com]