My struggle with Vim

Abandoning Sublime Text for another new editor is hard. Like really freaking hard.

After almost a day spent installing and configuring vim, tmux and zsh on my linux and tweaking dotfiles for my main Mac development machine, I don't know whether I have spent my fall break wisely. I have a hundred gazillion things going on that I want to accomplish during this short break: finishing that CS web page for my CS club; studying for my CS 301 mid-term; finishing online UC Berkeley's videos on operating systems as well as tutorials on topics like ReactJS, Ionic framework, etc. But here I am, on a Sunday (I have Monday off but still), besides from an internship application that reads more like a college application all over again, I barely accomplish what I consider as productive work that I've listed above. And besides I don't use Vim very often anyways. Which makes me wonder the merits of learning Vimafter all.

Sometime during July 2015, I decided to learn Vim out of curiosity and vanity. Over several years since I started programming, I've always heard about the great debate among veteran programmers: the text editor war. After perusing dozens of opinion articles, I decided to take a deep breath and try my hand at learning Vim. Over a month or so, I got used to the Vim way of doing things. Even now, I'm editing this in Vim and felt kinda proud hjkl my way, dw some words, r[char] some letters. I guess modal editing isn't so bad. In fact, it's quite addicting actually; I've been browsing the internet with Vim commands.

So what exactly is the problem then? Well, to tell the truth other than some cool arcane neat tricks that I learned from this new editor, I haven't actually used Vim in a substantive manner to justify my switch from Sublime Text. I still use ST for my school projects and hackathon hacks. I haven't reached a point where I'm 100% comfortable using only Vim. And I've only recently learned about tmux which is a crucial companion to Vim apparently. I get that the whole point of Vim is to reduce friction when working with web server, database server, and text editing without the mental switch between moving your fingers on the keyboard and reaching for the mousepad (although how true is the last statement I'm still debating). Yes, it feels good being able to change strings in the bracket without carefully highlighting words using the mousepad (the command is ci" - pretty cool huh). I can finally go full screen mode without having to switch back and forth between text editing and the terminal with too much friction. Now if only the browser can somehow be tmuxed into the terminal (hmm...). And learning vim script and seeing other people's dotfile setups and their differences in preference actually is kinda fun to me.

I guess one of the annoyings thing about using Vim instead of a pretty UI editor like ST is the folder structure. I like being able to switch between files using the mousepad. I like to see the location that the file I'm editing is in relative to project root folder when I'm editing my code. I guess NERDTree plugin is fine. But the urge to just mouse over the folder I want and click on the file I want to edit next is too tempting. And instinctively I feel mousing over folders is much more natural than toggling NERDTree folder menu (even with handy remapping like ne that I use in my vimrc) and hjkl my way and then hit o or t or T in order to open a file in various manners. Also, the minimap feature in ST is really nice when I'm navigating a long file. I know once I mastered hjkl, I should move on to line editing and be good at w or b for faster navigation within a file. But still, dragging the mouse on the minimap to the location I want and just click on the location within the line I want to edit is way more intuitive than Vim commands I've used so far. Also autocomplete. Fine, there should be autocomplete plugins in Vim that I haven't used yet so maybe this point is moot for now.

So what keeps me from completely abandoning my effort to learn Vim altogether and just use ST (like normal people would)? Well, I can't completely deny that using Vim makes me feel powerful and feel "accepted" as a serious professional programmer like one of those "neck-beard" programmers (think Richard Stallman). Secondly, since I spent so much time learning all the basics of Vim commands already, I want to be able to use those on the daily basis other than just browsing the Internet while looking cool. I thought since I've only experimented with Vim for less than a month (I started in July but I've largely spent most of real programming task in ST) and learning Vim apparently is a never ending journey (at least Stackoverflow grandmasters would have me believe), I should give it more time.

Who knows, maybe one day I'll be a regular Vim user and will look at other IDE and UI text editor users with derision. One day.