Stories
Slash Boxes
Comments

SoylentNews is people

SoylentNews is powered by your submissions, so send in your scoop. Only 15 submissions in the queue.
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.
(1)
  • (Score: 4, Funny) by MichaelDavidCrawford on Tuesday October 24 2017, @07:30AM (17 children)

    by MichaelDavidCrawford (2339) Subscriber Badge <mdcrawford@gmail.com> on Tuesday October 24 2017, @07:30AM (#586755) Homepage Journal

    But us Christians Use:

    Eight
    Megs
    And
    Constantly
    Swapping

    --
    Yes I Have No Bananas. [gofundme.com]
    • (Score: 2) by maxwell demon on Tuesday October 24 2017, @07:57AM (3 children)

      by maxwell demon (1608) on Tuesday October 24 2017, @07:57AM (#586762) Journal

      I'm sure you mean Escape Meta Alt Control Shift.

      The other backronym is utterly outdated. A system constantly swaps because a program uses 8 megabytes? How many programs these days actually use less than that?

      --
      The Tao of math: The numbers you can count are not the real numbers.
      • (Score: 2) by MichaelDavidCrawford on Tuesday October 24 2017, @08:27AM (1 child)

        by MichaelDavidCrawford (2339) Subscriber Badge <mdcrawford@gmail.com> on Tuesday October 24 2017, @08:27AM (#586771) Homepage Journal

        like really nasty feature phones like the one Fred Meyer sells for $14.99.

        The Oxford Semiconductor OXFW911 had 1800 bytes of RAM. Not megabytes, not kilobytes: bytes.

        I wanted to use more RAM for a project so I created a spreadsheet that had all the memory objects in it, then shorted some arrays.

        --
        Yes I Have No Bananas. [gofundme.com]
        • (Score: 2) by Wootery on Tuesday October 24 2017, @11:56AM

          by Wootery (2341) on Tuesday October 24 2017, @11:56AM (#586807)

          Ought to be enough for anyone, right? ;-P

      • (Score: 1, Redundant) by isostatic on Tuesday October 24 2017, @09:09AM

        by isostatic (365) on Tuesday October 24 2017, @09:09AM (#586785) Journal

        The other backronym is utterly outdated

        No shit.

    • (Score: 1, Insightful) by Anonymous Coward on Tuesday October 24 2017, @12:34PM (1 child)

      by Anonymous Coward on Tuesday October 24 2017, @12:34PM (#586819)

      Let's bring that into the 21st century: 8 gigabytes and constantly swapping.
      Not picking on vim, that's for all modern software.

      • (Score: 0) by Anonymous Coward on Tuesday October 24 2017, @02:14PM

        by Anonymous Coward on Tuesday October 24 2017, @02:14PM (#586859)

        So, what's EGACS? :D

    • (Score: 0) by Anonymous Coward on Tuesday October 24 2017, @01:35PM

      by Anonymous Coward on Tuesday October 24 2017, @01:35PM (#586839)

      Um... Pagan here. How are all you non-pagans doing these days? I heard you had to relearn your Redmond built user interfaces ten times since my sparc station was first blessed with the blood of virgins. Forced upgrades must be hell.

      Anyway, ya'll are welcomed at the old pentagram any time. BYOB and all that.

      Cheers!

    • (Score: 2) by Thexalon on Tuesday October 24 2017, @02:41PM (7 children)

      by Thexalon (636) on Tuesday October 24 2017, @02:41PM (#586874)

      Actually, speaking as a pagan, I'm polytheistic, so I regularly use both vim and emacs. Sometimes at the same time.

      --
      The only thing that stops a bad guy with a compiler is a good guy with a compiler.
      • (Score: 0) by Anonymous Coward on Tuesday October 24 2017, @02:47PM (1 child)

        by Anonymous Coward on Tuesday October 24 2017, @02:47PM (#586879)

        so you're that teacher I heard about who wrote the (geometry) problem with one hand and drew the picture with the other hand. at the same time.

        • (Score: 0) by Anonymous Coward on Tuesday October 24 2017, @04:36PM

          by Anonymous Coward on Tuesday October 24 2017, @04:36PM (#586922)

          Grab a potato chip and eat it?

      • (Score: 2) by LoRdTAW on Tuesday October 24 2017, @05:16PM

        by LoRdTAW (3755) on Tuesday October 24 2017, @05:16PM (#586947) Journal

        You kinky bastard! Well, at least I'm not alone in this hateful world.

      • (Score: 2) by Phoenix666 on Tuesday October 24 2017, @07:14PM

        by Phoenix666 (552) on Tuesday October 24 2017, @07:14PM (#587017) Journal

        That's sick. And wrong.

        --
        Washington DC delenda est.
      • (Score: 2) by MichaelDavidCrawford on Tuesday October 24 2017, @09:05PM (2 children)

        by MichaelDavidCrawford (2339) Subscriber Badge <mdcrawford@gmail.com> on Tuesday October 24 2017, @09:05PM (#587101) Homepage Journal

        Richard Stallman praised it for being highly orthogonal.

        --
        Yes I Have No Bananas. [gofundme.com]
        • (Score: 3, Interesting) by Thexalon on Tuesday October 24 2017, @10:20PM

          by Thexalon (636) on Tuesday October 24 2017, @10:20PM (#587144)

          It's possible to run vim's binary within emacs and vice versa. That to me is the perfect demonstration of their flexibility.

          --
          The only thing that stops a bad guy with a compiler is a good guy with a compiler.
        • (Score: 2) by srobert on Tuesday October 24 2017, @11:18PM

          by srobert (4803) on Tuesday October 24 2017, @11:18PM (#587153)

          Emacs with evil mode is tolerable or perhaps Spacemacs is OK. But I prefer vim, actually neovim. Other editors have a strange feature of littering my text files with extraneous "j's k's f's and w's"

    • (Score: 2) by forkazoo on Tuesday October 24 2017, @07:36PM (1 child)

      by forkazoo (2561) on Tuesday October 24 2017, @07:36PM (#587048)

      Of course Vim is for pagans, that's why you start it by typing Roman Numeral Six.

      • (Score: 2) by bart9h on Wednesday October 25 2017, @01:31AM

        by bart9h (767) on Wednesday October 25 2017, @01:31AM (#587203)

        VI VI VI

        the editor of the beast

  • (Score: 1, Funny) by Shinobi on Tuesday October 24 2017, @10:32AM (10 children)

    by Shinobi (6707) on Tuesday October 24 2017, @10:32AM (#586796)

    Simply alias vim to be nano instead, or notepad++ running under WINE.

    Go back in time to shoot Vim authors.
    Go back in time to shoot Vi author.
    While you're there, shoot Emacs author.

    • (Score: 5, Funny) by The Mighty Buzzard on Tuesday October 24 2017, @11:48AM (9 children)

      by The Mighty Buzzard (18) Subscriber Badge <themightybuzzard@proton.me> on Tuesday October 24 2017, @11:48AM (#586804) Homepage Journal

      I'm sorry but your geek card is hereby revoked for suggesting using a Windows text editor. You may reapply for it once you have cleared everything but games from your wine profile(s). You will of course have to retake the written test.

      --
      My rights don't end where your fear begins.
      • (Score: 3, Funny) by chromas on Tuesday October 24 2017, @12:24PM (1 child)

        by chromas (34) Subscriber Badge on Tuesday October 24 2017, @12:24PM (#586814) Journal

        I run Cygwin under wine 😈

        • (Score: 1, Touché) by Anonymous Coward on Tuesday October 24 2017, @08:19PM

          by Anonymous Coward on Tuesday October 24 2017, @08:19PM (#587073)

          I run Cygwin under Emacs.

      • (Score: 2) by Post-Nihilist on Tuesday October 24 2017, @01:04PM (6 children)

        by Post-Nihilist (5672) on Tuesday October 24 2017, @01:04PM (#586827)

        I am guilty of wrapping TortoiseSVN in a series of shell script to integrate it into my file manager.
        The Linux equivalent are sub-par when it comme to merging a range of revision, yeah , I should use git but I would have the same problems as I am a compulsive mouse clicker and I dont dictate source control at work...

        But even the mouse jerk like me, recognize the futility of using a windows editor in linux. My default is Geany and if, and only if, i want to apply the result of a small script and or a huge multiline regex, on a lots of files I use jEdit : an ugly but really powerfully editor , kind of Emacs in Java. Since my Java is better than my lisp (the only dialect I know is scheme), to me it is more powerful with the added bonus that I dont feel like I am joining a cult, a disphoric feeling I had when trying Emacs.

        When I code, I use Intellij IDEA, that way I dont have to pollute my memory with library specific knowledge, I can concentrate on the core logics.

        With the recent versions, I could even go as far as paging out the languages idiom and that IDE would pull me in the right way (at least in Python, Java, Ruby, Js, Php and Go )

        But on a headless server (the way the gods intended them to be), nothing beats Vim...

        --
        Be like us, be different, be a nihilist!!!
        • (Score: 0) by Anonymous Coward on Tuesday October 24 2017, @02:14PM (4 children)

          by Anonymous Coward on Tuesday October 24 2017, @02:14PM (#586861)

          APIs can be irritating. I use Netbeans and Visual Studio (community) with their respective [sourceforge.net] Vim extensions [github.com].

          What's a good setup for C/C++? Netbeans has always been mediocre, and I'm looking for something for use at home, so FLOSS is a must. Right now I just use Vim with lots of tabs open in the browser pointing to API docs. Is there a good ctags guide for Vim?

          • (Score: 2) by The Mighty Buzzard on Tuesday October 24 2017, @03:23PM (3 children)

            by The Mighty Buzzard (18) Subscriber Badge <themightybuzzard@proton.me> on Tuesday October 24 2017, @03:23PM (#586895) Homepage Journal

            I suppose you could use Eclipse. I've been forced to use IDEs over the years but I always go back to (g)vim and browser tabs or terminal screens full of docs as soon as nobody's looking.

            --
            My rights don't end where your fear begins.
            • (Score: 3, Interesting) by Phoenix666 on Tuesday October 24 2017, @07:17PM (2 children)

              by Phoenix666 (552) on Tuesday October 24 2017, @07:17PM (#587023) Journal

              "I suppose you could use Eclipse. I've been forced to use IDEs over the years"

              *Shudder* IDEs make my skin crawl. You mean I have to touch my *mouse* to code?

              --
              Washington DC delenda est.
              • (Score: 2) by Post-Nihilist on Wednesday October 25 2017, @02:08AM

                by Post-Nihilist (5672) on Wednesday October 25 2017, @02:08AM (#587221)

                CLion from https://www.jetbrains.com/clion/ [jetbrains.com] if your employer have the $ for it or if you feel your increase of productivity pays for it...

                I use to hate Jetbrains IDEs but since they made them less opinionated on the layout you should be using (it changed gradually over a few years) , i would not go back to Netbeans or (puke a little in my mouth) Eclipse.

                They use a subscription model but you have a perpetual fallback licence for the last version installed when you were a subscriber...

                --
                Be like us, be different, be a nihilist!!!
              • (Score: 2) by The Mighty Buzzard on Wednesday October 25 2017, @02:29AM

                by The Mighty Buzzard (18) Subscriber Badge <themightybuzzard@proton.me> on Wednesday October 25 2017, @02:29AM (#587231) Homepage Journal

                Well, there are like two or three things it's just faster to do with a mouse. Which is why I use gvim. All the vim-y goodness with a tiny bit of added utility.

                --
                My rights don't end where your fear begins.
        • (Score: 1) by mmh on Tuesday October 24 2017, @02:52PM

          by mmh (721) on Tuesday October 24 2017, @02:52PM (#586883)

          But even the mouse jerk like me

          If you haven't already, highly recommend you checkout EasyStroke (https://github.com/thjaeger/easystroke), it comes packaged with most distros.

          Other mouse jerks will think you're a magical unicorn!

  • (Score: 2) by turgid on Tuesday October 24 2017, @12:30PM (3 children)

    by turgid (4318) Subscriber Badge on Tuesday October 24 2017, @12:30PM (#586816) Journal

    Sed's usually much quicker. But I use Flash to clean my floor. And I remember when we had Marathon bars and Jif.

    • (Score: 3, Interesting) by theluggage on Tuesday October 24 2017, @01:47PM (2 children)

      by theluggage (1797) on Tuesday October 24 2017, @01:47PM (#586846)

      And I remember when we had Marathon bars and Jif.

      Jif... Wasn't that the stuff you put on pancakes? Made them taste nice and lemony and got your teeth clean.... Went away because Compuserve claimed to have a patent on it... :-)

      • (Score: 1, Informative) by Anonymous Coward on Tuesday October 24 2017, @02:39PM (1 child)

        by Anonymous Coward on Tuesday October 24 2017, @02:39PM (#586872)

        Jif was just a brand name, the reason I heard they changed it was because in some countries (e.g. Spanish speaking ones) had trouble pronouncing it, so they changed it to Cif. Anyway, I think they did do lemon juice, which you might put on pancakes, but were better known for their cleaning products.

        What do you think Compuserve claimed to have a patent on, lemon juice, or the name "Jif"? Because lemon juice is obviously not patentable, and neither is a name, what you do to names is trademark them, and trademarks are often restricted by types of businesses, so you can have two different companies selling products under the same trademarked name, but because they sell different types of products, there is no conflict.

        • (Score: 2) by theluggage on Wednesday October 25 2017, @03:41PM

          by theluggage (1797) on Wednesday October 25 2017, @03:41PM (#587412)

          What do you think Compuserve claimed to have a patent on, lemon juice, or the name "Jif"?

          Darn, the internet filtered out those invisible <joke> tags again.

          vim (editor) => Vim (kitchen cleaner) => jif (kitchen cleaner) => Jif (lemon juice) => GIF (Graphics Interchange Format). None actually related to the other AFAIK although both of the Jifs smell of lemon...

          Jif (disambiguation) [wikipedia.org].

          The GIF case [wikipedia.org] was an early example of software patent blight in the 1990s. Now you've made me do more reference checking than was necessary for a silly comment, I owe Compuserve an apology - it was Unisys who tried to assert the patent.

          Turns out that there was a lawsuit over Jif lemon too... You live and learn...

  • (Score: 0, Disagree) by Anonymous Coward on Tuesday October 24 2017, @12:31PM (12 children)

    by Anonymous Coward on Tuesday October 24 2017, @12:31PM (#586817)

    The article left out the main thing to remember in vim: try to remember which fucking mode you are in for that split second. Insert mode or not? Jesus, the modal interface is the worst thing about vim and a constant source of user error. Even worse, it is totally unnecessary.

    • (Score: 0) by Anonymous Coward on Tuesday October 24 2017, @12:56PM (1 child)

      by Anonymous Coward on Tuesday October 24 2017, @12:56PM (#586821)

      1978, terminals and 120baud modems.

      • (Score: 2) by theluggage on Tuesday October 24 2017, @02:03PM

        by theluggage (1797) on Tuesday October 24 2017, @02:03PM (#586853)

        1978, terminals and 120baud modems.

        You irresponsible clod - vi may be nice and easy for lazy young kids who can't be bothered to learn a proper line editor like sed or TECO, but what are you going to do when all the VDUs are down and you have to fix the system using only the console teleprinter*? How's someone going to check your work if its not all printed out on green music-lined paper?

        (* I'm only just old enough to have been there... the punched card readers had gone a year or two before, but there was still an infinite supply of telephone note paper with one corner cut off... )

    • (Score: 2) by TheRaven on Tuesday October 24 2017, @02:16PM (8 children)

      by TheRaven (270) on Tuesday October 24 2017, @02:16PM (#586863) Journal
      If you forget, glance at the bottom-left corner of the window and it tells you. I generally dislike modal interfaces, but in vim I quite like it because writing text and editing text should be separate activities. I find that I'm much more productive when I stay in insert mode for as long as possible while writing and then switch to command mode for editing.
      --
      sudo mod me up
      • (Score: 2) by https on Tuesday October 24 2017, @04:03PM (7 children)

        by https (5248) on Tuesday October 24 2017, @04:03PM (#586911) Journal

        Sure you can check. But having to do so *interrupts the flow* of writing. The increased cognitive load slows users down and makes errors more likely. Just because you aren't conscious of it doesn't mean it's not there.

        I'm struggling to understand how you developed the belief that writing in a text file doesn't constitute editing it.

        --
        Offended and laughing about it.
        • (Score: 0) by Anonymous Coward on Tuesday October 24 2017, @05:43PM (3 children)

          by Anonymous Coward on Tuesday October 24 2017, @05:43PM (#586960)

          Haha yeaaaah wtf is up with that? I doubt the slower interface is better over the long term, and you have to learn so many esoteric commands to use VIM that I just don't see the point. I use it only when I'm unable to access a real editor.

          Yeah you heard me, a REAL editor that doesn't require an advanced degree in Esoteria to operate.

          • (Score: 2) by Phoenix666 on Tuesday October 24 2017, @07:23PM (1 child)

            by Phoenix666 (552) on Tuesday October 24 2017, @07:23PM (#587032) Journal

            It is a long learning curve, but it's worth the climb. In vim I can teleport anywhere with a keystroke and make changes as quick as breathing. It's as close to telepathically linking to an interface as I've ever come. I actually get a charge out of using it, even if I'm doing something as tedious as working on a CSS file or something. Having to use an IDE more than halves my productivity and feels like having fallen into a tar pit. Those flashes of inspiration that can carry you for hours when in the flow of writing code don't come. Having to fuck around with the mouse breaks the spell every time.

            YMMV

            --
            Washington DC delenda est.
            • (Score: 0) by Anonymous Coward on Tuesday October 24 2017, @08:52PM

              by Anonymous Coward on Tuesday October 24 2017, @08:52PM (#587088)

              I don't even think it is a long learning curve. Maybe to master it, but you can be up and flying along with only a handful of commands. But if you work a lot with text files, I've found that the return on the investment is HUGE if you spend the time to learn vim beyond the basic level of competency.

          • (Score: 2) by The Mighty Buzzard on Wednesday October 25 2017, @02:31AM

            by The Mighty Buzzard (18) Subscriber Badge <themightybuzzard@proton.me> on Wednesday October 25 2017, @02:31AM (#587233) Homepage Journal

            Das racis, you Esoteriaphobe!

            --
            My rights don't end where your fear begins.
        • (Score: 2) by TheRaven on Wednesday October 25 2017, @01:32PM (2 children)

          by TheRaven (270) on Wednesday October 25 2017, @01:32PM (#587356) Journal

          But having to do so *interrupts the flow* of writing

          No it doesn't, because when you're writing you are in insert mode. When you are editing, you are in command mode or one of the visual modes. Whenever you switch from writing to editing, you are interrupting the flow. Vim adds a small UI barrier to this switch, which discourages you from doing it and makes you focus on separating the tasks of writing and editing.

          I'm struggling to understand how you developed the belief that writing in a text file doesn't constitute editing it.

          I developed this view at some point over the 150 or so articles, 4 books, and one PhD thesis that I wrote using vim, which wc tells me add up to about a million words, though I was influenced by someone else who recommended writing with cat and editing with something else.

          --
          sudo mod me up
          • (Score: 2) by https on Monday October 30 2017, @03:09AM (1 child)

            by https (5248) on Monday October 30 2017, @03:09AM (#589328) Journal

            The huge amount of work you've invested into the paradigm says nothing about how it developed. I hope you can see why I might think there is a large sunk-cost fallacy at play.

            when you're writing you are in insert mode. When you are editing, you are in command mode

            This doesn't explain how adding or erasing stuff from a file isn't editing it. What is the difference, to you?

            --
            Offended and laughing about it.
            • (Score: 2) by TheRaven on Monday October 30 2017, @10:07AM

              by TheRaven (270) on Monday October 30 2017, @10:07AM (#589395) Journal

              This doesn't explain how adding or erasing stuff from a file isn't editing it. What is the difference, to you?

              Erasing is editing. Adding in the middle is editing. If you want to be productive, these should be separate tasks from writing, because they break flow. I started off using OpenOffice for a lot of stuff and found that there was always a temptation to either play with formatting or to go back and rewrite things. I'm most productive when I sit in insert mode and type, then go back and edit as a separate pass. Apparently I'm not the only one, because you'll find a lot of other writers recommending this workflow. Vim, by accident rather than design, encourages this pattern.

              --
              sudo mod me up
    • (Score: 2) by bart9h on Wednesday October 25 2017, @01:34AM

      by bart9h (767) on Wednesday October 25 2017, @01:34AM (#587208)

      What mode I am in? Normal mode, of course. I stay in normal mode all the time. You enter insert mode to to type text, then immediately hit ESC to go back to normal mode.

      One does not stay in insert mode.

  • (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.

    • (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]
  • (Score: 3, Funny) by Techwolf on Tuesday October 24 2017, @02:00PM (12 children)

    by Techwolf (87) on Tuesday October 24 2017, @02:00PM (#586851)

    Someone need to patch VIM so one can exit the program without having to switch terminals and killall VIM.

    I have search and read all the hints online. The only thing that happens is the q! and other characters are typed on the screen as part of the document text.

    Can someone please point me to a keyboard vender that actually sells a keyboard that has the "meta" key?

    • (Score: 0) by Anonymous Coward on Tuesday October 24 2017, @02:22PM (1 child)

      by Anonymous Coward on Tuesday October 24 2017, @02:22PM (#586865)

      You... You're making a joke right?

      • (Score: 2) by Techwolf on Monday November 06 2017, @02:31AM

        by Techwolf (87) on Monday November 06 2017, @02:31AM (#592773)

        Sadly, no. I been running Gentoo for the past 10 plus years and masked vim so it never plagues me again.

    • (Score: 0) by Anonymous Coward on Tuesday October 24 2017, @02:26PM (4 children)

      by Anonymous Coward on Tuesday October 24 2017, @02:26PM (#586867)

      Is there bright text saying -- INSERT -- at the bottom? Press esc first. In fact, mash esc a bunch of times.

      Then access the command line thingie. Press colon (:). You should get a colon prompt at the bottom. That's where you type q!.

      q = quit
      ! = do it even if there are unsaved changes

      Another handy one is wa (save all).

      w = write
      a = all buffers

      Lots of people use wq.

      w = write
      q = quit

      Can also be combined: wqa.

      w = write
      q = quit
      a = all buffers

      Vim is a modal editor. Insert is one mode, then there's the mode when you esc out of insert (this is where things like cw (change word) work), then there's the command prompt where q! works. There are other modes as well such as search (/ after esc from insert mode) and visual/visual line (v and V respectively after esc from insert mode).

      • (Score: 2) by DECbot on Tuesday October 24 2017, @03:59PM (3 children)

        by DECbot (832) on Tuesday October 24 2017, @03:59PM (#586906) Journal

        And what do you do when your computer vendor is too hip to include [theverge.com] the ESC key on your keyboard?
         

        (don't bother telling me how to do it with the bar, I have no interest with laptops and keyboards that double as razor blades.)

        --
        cats~$ sudo chown -R us /home/base
        • (Score: 2) by pbnjoe on Tuesday October 24 2017, @04:42PM

          by pbnjoe (313) on Tuesday October 24 2017, @04:42PM (#586925) Journal

          Press Ctrl + [ instead. :)

          But best not to purchase from that vendor in the first place.

        • (Score: 2) by Phoenix666 on Tuesday October 24 2017, @07:25PM

          by Phoenix666 (552) on Tuesday October 24 2017, @07:25PM (#587033) Journal

          You mean, there's no escape?

          --
          Washington DC delenda est.
        • (Score: 2) by TheRaven on Wednesday October 25 2017, @01:35PM

          by TheRaven (270) on Wednesday October 25 2017, @01:35PM (#587358) Journal
          The MacBooks have an escape key, it's just software defined on the buzzword bar (and controllable from the terminal, so you can teach vim to set the other keys to behave like function keys but displaying the name of the action that you've defined for them to use). The iPad, in contrast, has no escape key on its keyboard. The fact that the iPad Pro keyboard has an emoji key, but no escape, makes it a bit of a joke (but if anyone knows a way of making the emoji key work as escape, let me know...)
          --
          sudo mod me up
    • (Score: 2) by Arik on Tuesday October 24 2017, @04:01PM

      by Arik (4543) on Tuesday October 24 2017, @04:01PM (#586909) Journal
      "The only thing that happens is the q! and other characters are typed on the screen as part of the document text."

      You forgot to escape colon. The full mnemonic is ESCape this :(colon) thing Quit and do !return.

      --
      If laughter is the best medicine, who are the best doctors?
    • (Score: 2) by el_oscuro on Wednesday October 25 2017, @02:03AM (1 child)

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

      While this is obviously a joke, try running vimtutor, then follow the tutorial. You would be surprised how much you learn, even if you have been using vi awhile.

      --
      SoylentNews is Bacon! [nueskes.com]
      • (Score: 2) by Techwolf on Monday November 06 2017, @02:33AM

        by Techwolf (87) on Monday November 06 2017, @02:33AM (#592775)

        Sorry, it is not a joke. I masked vim on my gentoo system so I never be plague by that program ever again.

    • (Score: 0) by Anonymous Coward on Wednesday October 25 2017, @04:17AM

      by Anonymous Coward on Wednesday October 25 2017, @04:17AM (#587262)

      Reminds me of this gem pertinent to the whole thread actually https://www.gnu.org/fun/jokes/ed-msg.html [gnu.org]

    • (Score: 2) by Wootery on Wednesday October 25 2017, @10:06AM

      by Wootery (2341) on Wednesday October 25 2017, @10:06AM (#587316)

      I'm a fan of Vim, but it's a fair point. Why is Vim so hard to close?

  • (Score: 4, Interesting) by rob_on_earth on Tuesday October 24 2017, @02:20PM (1 child)

    by rob_on_earth (5485) on Tuesday October 24 2017, @02:20PM (#586864) Homepage

    A free (first few levels) web based graphical game that uses VIM keys to move a character around and complete dungeon crawler type tasks
    https://vim-adventures.com/ [vim-adventures.com]

    Would love this to be open sourced and freely available in its entirety.

    Great as a refresher of the basic commands

    • (Score: 0) by Anonymous Coward on Tuesday October 24 2017, @08:55PM

      by Anonymous Coward on Tuesday October 24 2017, @08:55PM (#587091)

      Why not just good old nethack [nethack.org]? That uses the same vi movement keys (well, at least the more useful versions that aren't trying to be GUI-friendly).

  • (Score: 2) by t-3 on Tuesday October 24 2017, @02:27PM (3 children)

    by t-3 (4907) on Tuesday October 24 2017, @02:27PM (#586870)

    Now I'm stuck with vis. Multiple cursors and more powerful regex, so nice. Plus its only 700k on my machine with all the optional dependencies, statically compiled.

    • (Score: 2) by Post-Nihilist on Wednesday October 25 2017, @02:21AM (2 children)

      by Post-Nihilist (5672) on Wednesday October 25 2017, @02:21AM (#587227)

      Do you know of a good primer on Structural Regular Expressions?
      That sounds like something a computer scientist should learn.....

      Presently the finest regex engine I know of is the one in .Net , i wish grep could do that https://docs.microsoft.com/en-us/dotnet/standard/base-types/grouping-constructs-in-regular-expressions#balancing-group-definitions [microsoft.com] i know that I could do it with grep perl mode and a recursive regex but recursive regex are not only almost impossible to read they are hard to write...

      --
      Be like us, be different, be a nihilist!!!
      • (Score: 0) by Anonymous Coward on Wednesday October 25 2017, @02:29AM

        by Anonymous Coward on Wednesday October 25 2017, @02:29AM (#587232)
      • (Score: 3, Insightful) by t-3 on Wednesday October 25 2017, @02:44AM

        by t-3 (4907) on Wednesday October 25 2017, @02:44AM (#587240)

        What the AC linked will get you started, but for me none of it really 'clicked' until I started using them and no longer had to pull up documentation to write stuff that would have had me scratching me head staring at manpages and googling with sed or grep or vim. Being able to parse a complex expression at a glance rather than having to decode it consciously makes things a lot easier.

  • (Score: 2) by darkfeline on Wednesday October 25 2017, @03:47AM (2 children)

    by darkfeline (1030) on Wednesday October 25 2017, @03:47AM (#587254) Homepage

    As a former Vim user, I am well aware of how efficient Vim is at shifting around characters, but text editing is menial labor. Standing at a higher level, it's cute how Vim users see themselves as superior to Notepad users. Look at how efficiently I can move these characters around!

    The Emacs revelation is that your editor should be easy to program so that you can let your editor do your grunt work for you. While a Vim user would be busy composing single letter commands, I run commands that manipulate large chunks of code. Sure, it takes a few extra keystrokes, but can a Vim user apply De Morgan's laws to a ten line boolean expression with three keystrokes? Nay, for he is too busy deleting and inserting individual words with his oh-so-efficient composable commands. Can a Vim user extract a closure into a class with five keystrokes? Nay, for he is too busy trying to get his substitute regular expression correct (he can't be blamed however, for Vim has four different kinds of regular expressions: magic, no-magic, very magic, and very no-magic. I kid you not.)

    --
    Join the SDF Public Access UNIX System today!
    • (Score: 2) by TheRaven on Wednesday October 25 2017, @01:38PM (1 child)

      by TheRaven (270) on Wednesday October 25 2017, @01:38PM (#587360) Journal
      You realise that vim has support for Python, Ruby, Lua, Tcl, and Perl as optional scripting language and Vim Script built in?
      --
      sudo mod me up
      • (Score: 2) by darkfeline on Thursday October 26 2017, @07:24AM

        by darkfeline (1030) on Thursday October 26 2017, @07:24AM (#587734) Homepage

        You realize that Vim support for Python et al would be hilarious if it wasn't so sad? Having to call eval() all the time to run VImL does not count as "support for Python". And are you really suggesting that VimL is an acceptable language? PHP would be better, and that's not a very high bar.

        And Vim is mostly written in C, not extensible unless you count recompiling Vim. You'd have to read through Vim's horrible code first; just ask the Neovim guys how much fun that is.

        --
        Join the SDF Public Access UNIX System today!
(1)