Should You Bother Learning VIM?

If you’ve been programming for some time, you’ve probably heard of “vim”, a command-line text editor. If you have no idea how to use it, it might be time to learn it. But should you? Read more in this article.

What is VIM?

VIM (Vi IMproved) is a command-line text editor. It’s available on Unix, Linux, and Windows.

It’s popular with software developers for many reasons, which I’ll go into in this article. The reason it’s so different from other text editors (such as a command line, or Notepad) is that you can perform many text manipulation commands right from a single line. It aims to boost productivity by using these commands and shortcuts, which don’t exist in other text editors or IDEs.

Vim has been around for many years, and many software developers are familiar with it. The term “learning VIM” refers to learning how to use it, learning the commands, and generally learning how to be productive with it.

But should you learn VIM?

Personally, I don’t know how to use it. I’ve seen people who use it, and thought that it looks impressive, but I’ve never taken the time to learn. I’ve found that Notepad++ has been sufficient for me for many years, and being brought up with graphical user interfaces, using a command-line text editor seems unintuitive. But, I can appreciate the productivity benefits you get from it once you know how to use it, and I’m really considering learning it.

Why Should You Bother Learning VIM?

So, why should you learn VIM?

There are a few reasons to learn VIM.

It’s on every Unix machine and most Linux machines.

Having such a wide availability makes it easier to access, no matter where you are. There’s no need to install other editors, as you can just use vim.

Increased productivity

Most people who use vim say that it’s worth learning as it improves your productivity. Tasks that usually require arrow keys to move around, such as copying and pasting lines of code from a few lines above, are much easier in vim. You can use it without a mouse as well, and navigating files with the keyboard is much easier and faster.

Once you are competent with vim, you’ll be much more productive with it.

You don’t need to master it

Some people (myself included) think that you need to master the vim tool to actually see any benefits from it. I’ve been told this isn’t true. You just need to know the basics and have a little experience to start seeing what it can do and to actually get some productivity benefits from it.

There are a few basic commands, such as navigating up and down lines, saving files, and switching from insert to command mode, that once learned, will show you that editing files can be fast.

It’s not as hard as you think

While it’s often said that vim has a steep learning curve, I’ve seen reports (from many Stack Overflow users) that the basics of learning vim is not that hard or time consuming.

Vim includes a tutorial called vimtutor. You should just be able to run the command “vimtutor” on the command line.

It’s a short tutorial, which takes between 30-60 minutes. Repeated usage will make you more familiar with it.

You can probably spend a week running through the tutorial each day, and be familiar with the VIM basics by the end of the week.

From there, you can look up any of these sites:

A lot of tips available on Stack Overflow

Stack Overflow has a dedicated tag for vim. You can go there to find a lot of tips, from beginner to more advanced tips. You can ask questions there too – but be sure to search first, as they can be marked as duplicate if it’s already been asked.

Why Should You Not Learn VIM?

So, while you have a bunch of reasons to learn VIM, it’s not all positive.

Why should you not learn VIM?

I can only think of one reason.

You work mostly in Windows in an IDE

If you do most of your programming in a Windows server environment within an IDE (such as using C# on a Windows server), then you may not need to learn vim. You may find that you get enough benefits from using the IDE, and the fact it may not be on the Windows server, that it’s not worth your time.

That’s the only reason I can think of not to think about learning vim.

As a programmer, there are always new languages and technologies coming out, and learning is a big part of our career. Sometimes it’s good to “go back” and learn something that’s been around for a while, which includes vim.

You know how at the start of the article I said I haven’t learnt vim? Well, I think that after writing this article, I’ve convinced myself to learn it. Off to vimtutor I go!

What do you think? Do you know vim? If not, why haven’t you looked into learning vim?