While talking with a friend recently who works as a web developer, he mentioned checking out vim. I was perplexed at first as I had never heard of it before. My friend explained that it was a text editor, but didn’t give much insight outside of that. As soon as I got home, I googled it and found that vim commonly came preloaded on many computers. I opened my terminal and entered ‘vim’ and was immediately taken to a bizarre screen with minimal instructions except for how to access a help screen. However, perusing the help contents proved less that fruitful. All the commands seemed like a different language!
After a little more searching, I was able to figure out a little more about this “highly configurable text editor.” I soon found that vim comes with a tutorial (which can be accessed by entering ‘vimtutor’ in the terminal) which was incredibly helpful in explaining how to use this awesome program.
The first interesting thing about vim is that it’s designed to allow for all its functionality to be accessed via keyboard strokes. Basically, imagine doing everything you would do in Microsoft Word by only typing (this even includes moving the cursor! The ‘h’ key allows you to move left, ‘j’ goes down, ‘k’ is up, and ‘l’ goes to the right.) While the cursor can be used to interact with vim, I have found that everything begins to flow together a lot better if you can rely on how the system is primarily designed.
Vim definitely comes with a large learning curve. As I was going through the tutorial, I found myself constantly wanting to drift back to the mouse or forgetting to activate the ‘insert’ mode. But the tutorial did also show just how cool vim can be, and the tutorial only scratches the surface.
One of my favorite features of vim that I’ve found so far is that when you’re using brackets or parentheses, you can highlight one bracket to have the program show you it’s corresponding bracket, which is incredibly helpful for checking for any basic errors in code syntax.
I’ve been enjoying learning more about vim, although I will say that it has required a lot of practice. It’s something I intend to continue to use, however. In fact, I used it to write this blog!