Learning to Love Vim

Sep 12, 2021

vim screenshot

Introduction

When I first learned about Vim I wasn’t very enthusiastic about it, I wasn’t very open minded and didn’t want to use it because I didn’t know how to use it. However, things have changed, and I’m now using vim as my primary editor! I used to use Text Wrangler (back when I used a MacBook), then switched over to Visual Studio Code when I switched over to using Linux, I eventually settled on using Sublime Text, and still do use it for larger projects. However, I type all my blog posts, and papers, and some of my code in Vim. I learned how to use Vim back in 2019, I started loving Vim because it’s so simple and lightweight, yet it’s so powerful. Once you learn how to use Vim you’re probably not gonna want to use nano again, and I can’t use nano again, even for simple stuff I install Vim on every Linux installation, every UNIX-like operating system, and everything that I have the ability to install Vim on. I even use Vim on my iPhone with an app called iVim, or inside iSH Shell.

Learning how to use Vim

I recommend checking out vimtutor which comes preinstalled with Vim, and teaches you how to use it. I didn’t learn how to use Vim using vimtutor, I didn’t even know that Vim had a tutor when I was learning how to use it, however I wish I did because vimtutor teaches you so many useful things that I never learned for my first few months using Vim.

Configuring Vim

By default the Vim configuration isn’t very usable for me, I have to configure some things to be the way I want, for example, by default it doesn’t show line numbers which is a necessity for doing serious editing. I always have to enable that, otherwise it’s unusable for me. You can check my vimrc in my dotfiles repository to see all the changes I’ve made to the default configuration. As you can see I don’t have very many plugins for stock vim, however I do for neovim, which I don’t use very often, mainly because stock vim is typically enough. If you are curious, here’s my neovim config .

Using vim for editing

Vim has multiple modes, which separates it from many other editors, which are typically single mode. Vim has modes like insert mode, normal mode, and visual mode. These modes are all very useful for different things. I’m still getting used to each and every vim keybinding, and I’m discovering more and more things vim can do the more I use it. Vim is so packed full with features that you won’t learn everything at first, but you will discover more and more useful features to enhance your workflow the more you use it. It has so many useful features, and navigating Vim using hjkl means you don’t have to move your hand down to the arrow keys. If you want a good editor that doesn’t require using the mouse, highly recommended that you check out Vim.

Vim emulation in other editors

If you use Sublime Text, there’s a lot of packages to get Vim emulation. Emacs has a plugin called Evil which adds Vim emulation, and I think it’s pretty great. A lot of other editors either have plugins for Vim emulation or Vim modes. So you can transfer your Vim workflow to many other editors, which means you don’t have to stop using the editor you’re currently using, and it makes it really convenient to switch between editors, which is something I do quite a bit depending on what I’m working on.

Conclusion

In conclusion, I think Vim is a great editor, and I don’t regret using it. Vim has really enhanced my workflow and I think everyone should at least try it, even if you aren’t gonna stick with it. Using Vim saves hours of my day and if you get good at the Vim workflow you can really improve your productivity.

alicela1n

Magical girl from another dimension.

Why I use Arch Linux

Installing Gentoo