The start of 2020 wasn’t the first time I tried to switching to Vim, but it was the first time it stuck. I should mention that I’m not “good” at Vim: I never use :grep or :!, my .vimrc is basic as hell, I don’t use macros or plugins at all, only use the default buffer, and I’ve never learned how to properly copy things into/out of Vim. I have, however, gotten to a point where I’m pretty comfortable using Vim in my day-to-day, to the point where it’s my primary editor.

Getting into things

What ended up getting me to make the full switch was, somewhat weirdly, just going all in on it for a couple days. I had made the realization shortly before then that I didn’t really make use of any of the power features present in what was then my editor of choice (Sublime Text 3, for those curious): I used ReGeX search a ton, ctrl+p to open files, and that’s about it. So, armed with the knowledge that I wouldn’t actually be slowing myself down by using Vim, I grabbed the Vim plugin Ctrl+P (I’ll come back to this in a second) and resolved to just not open Sublime Text for the week, just to see how it went. Evidently, it went well.

Taking Notes and Learning

One thing rather different about this attempt at learning Vim was how I went about learning new commands/tricks. In extremely “me” fashion, I’d always dive far too deep far too quickly, get overwhelmed, and give up. This time around, I did two things differently:

1) I decided I wouldn’t just look up “useful vim tricks” or anything of the ilk. I’d look up a solution to a specific problem I was having (mostly, being annoyed at how slow an action seemed to be), or I wouldn’t look anything up at all.

2) Any time I found a useful new tip, I’d write it down in my personal wiki, to remember later. To that point, before I’d google how to do something, I’d check if I had already written it down before. The frequency with which I’d forget I already had the answer to my question was astounding, and this has been useful for far more than just expanding my Vim skills.

The result was that I didn’t overwhelm myself with the seemingly infinite depth of Vim, but did slowly get better at using the tool.

Plugins

Let’s take that pin out of Ctrl+P usage now. When I first switched, I thought it was incredibly important for me to have fuzzy file searching and file jumping in my tool. I looked up all the popular plugins for it (NerdTree, Ctrl+P, etc…), picked one, and off I went. Within two weeks, I had completely stopped using it and now I live my Vim life plugin free.

Most of my move away from Ctrl+P was spurred on by embracing the (Bash philosophy) a bit more, and getting into using find and grep more to look around for what I was looking for. Part of it was being introduced to this talk about replicating plugins with pure Vim, which I found when rather frustrated with some performance issues I was having with Ctrl+P.

The last, and maybe most useful factor in my switch away from plugins was learning how buffers, splits, and tabs work (note, I still barely know what I’m doing here). Which took… a while. For a while, I made the mistake of using Vim tabs like I should have been using buffers. Since I’ve changed that, I’ve felt way more productive. I might write my own take on things at some point, but until then take a look at these posts about using the various views.

Where Now?

Honestly, I’m kind of in a comfortable spot, and I’m not in a huge rush to get much “better” at Vim. Sooner rather than later I’d like to get more comfortable manipulating named buffers, and I’d certainly like to slowly make my vimrc more useful, but there aren’t (or at least don’t feel like there are) any glaring deficiencies in my workflow. So, for now, I take it slow.

Six Months of Vim
Tagged on:         

Leave a Reply

Your email address will not be published. Required fields are marked *