1. 29
  1.  

  2. 9

    One of my favorite Vim books is still Drew Neil’s Practical Vim. That book is a great read and it changed how I use Vim. I’ve bought it for a lot of my co workers.

    1. 7

      Author of screencast here. Cannot agree more about Practical Vim being the best resource out there. I’m such a fan that when he was in town I booked a day of Vim training with him.

      1. 2

        I need to go back to it I think. I am not very smart and forget stuff that I don’t use, but that book was jam packed with handy hints.

        1. 4

          (Author here) The key factor, for me, in improving my Vim ability was to create a dotfiles README where I documented everything I learned and referred back to it again and again until the commands were seared into my fingers.

          1. 3

            I think this applies to almost everyone; there’s actually a bunch of things in Vim that I know exist, but don’t really use much anyway.

            For example to select an entire { .. } block you can use va{V, but generally I’ll just manually go to one of the brackets (e.g. with [[, [{, {, or just moving the cursor) and use V%. This is rarely faster, but I got in the habit of doing it like that years ago before I really knew about text objects and such, and now I’m kinda stuck with it 😅

            I’m mostly okay with this, since I try to optimize for cognitive load rather than absolute speed, and manually moving the cursor tends to be a bit better for that since I don’t need to think so much about what it’s going to select.

            1. 3

              I believe one of the greatest aspects of the design of Vim is that you can choose your own tools and level of usage of more ‘advanced’ techniques.

              Over the years I have slowly added more and more tools to my belt - progressively enhancing, but never needing to, only choosing to when it suited me.

              For example, it was about ten years before I started using macros. Perhaps another ten before I started moving by searching. Maybe in another ten I’ll use buffers rather than opening an editor for one file, closing it - and opening another later. I use the shell to drive, but I know I can get more of an IDE experience if I ever want to.

              I don’t think I’d seen the ‘args’ feature before today. When I’ve done multi file edits in the past I’ve passed the names on the command line and done a ‘:n’ to move to the next file at the end of my macro (apologies if that’s wrong - I don’t do it often enough to remember).

        2. 4

          I’ve got to love that the meat of 2 out of 3 examples showed in the video involve Editing MACroS ;)

          1. 3

            I learned a few tricks that I didn’t know about ( for editing a command, and using :g to copy - only used it to delete so far). Thanks for sharing.