1. 31
  1.  

  2. 4

    Some of this is helpful, but I think it wanders off into preachy ideology at times. Some commands get over looked in the classic 15 minute intro to vim. It’s nice to have a refresher. But is it necessary to tell me I’m doing it wrong? It’s my editor, let me decide how to use it.

    1. 3

      This was quite helpful as an amateur vim user.

      I remain skeptical about the supposed necessity of hjkl vs the arrow keys, but the rest of it is good stuff.

      1. 4

        Moving to hjkl over the arrows was a hard move for me, but it helped me think more in terms of motions instead of movement. That way, it doesn’t matter if you are moving up two lines or yanking two lines - it is the same motion. You aren’t doing one thing to move and another to modify your action. FWIW, this article really helped me in terms of “thinking in vim” https://yanpritzker.com/learn-to-speak-vim-verbs-nouns-and-modifiers-d7bfed1f6b2d#.awwmgb6r9

        1. 2

          For those of you having trouble getting the muscle memory for hjkl down, there’s [this game]. I found it really helpful when I was first learning.

          Being able to move the cursor without having to move your fingers off home row, also getting used to moving the cursor only in normal mode (utilizing the other movement keys as well) increased my editing speed a lot.

          I also recommend remapping esc to caps lock.

          1. 2

            Since it looks like something filtered the game, googling ‘vim adventures’ gets you a fun one for teaching vim.

            I learned to hjkl using nethack, any roguelike that supports hjkl should get you there pretty fast though.

          2. 2

            Moving to hjkl is a Good Thing. Must admit, I didn’t find it too difficult to transition as when I was learning vi the arrow keys never seemed to work when I logged in to remote systems using telnet (yes, it was that long ago…).

            Something that can help - setting keybindings in other applications you use to use the same keys. For example, I use vi-style keybindings in mutt, tin, etc. If you use Gmail the same navigation keys work there too (not that I’d condone using Gmail, but some people seem to like it…).

        2. 2

          Great article. Really could be retitled “editing anti-patterns” because I find many of the same tropes useful in leveling up your emacs-fu as well.