DEV Community

Werner Echezuría
Werner Echezuría

Posted on

Why Vim

A lot of people try to teach how to use Vim, but a few explain why, there are people who don't understand why should they learn something with this steep learning curve when there are other alternatives, I'll try to give my reasons and you can make your own conclusion.

It's because I'm old

I'm 39 years old, I started programming in High School, I learnt FoxBase, which was some sort of mix between FoxBase and DBase. This tool included an editor so I don't need to worry about choosing one.

A few years later I decided to study a Computer Science Associates Degree, there I learnt VB 6.0, again I didn't need to worry about choosing an editor.

Later, I realized I needed to go into web development, so, I learnt PHP, by that moment I saw the difference between a programming language, compiler (interpreter) and editor. Between the few choices I had, I took Netbeans, later I learnt Ruby and keep it as an IDE.

As you can imagine I felt frustrated, Netbeans take so much time to load and to make simple things (considering using it for PHP 5 and Ruby 1.8 was an overkill), so I thought, I need something lighter and more useful. I took the decision to install Vim and start learning it.

Sometimes I tried other editors, for example, VsCode, but always look for a vim plugin.

So, am I using Vim (or vim plugin) because I'm old?, maybe, but it's not something I regret.

It's a sunk cost

Someone told me: You use vim because it's a sunk cost. Now, what is it?, according to Wikipedia, a sunk cost is: "a cost that has already been incurred and cannot be recovered. Sunk costs are contrasted with prospective costs, which are future costs that may be avoided if action is taken."

That seems like something you regret over time, do I think it was a waste of time? If I had other choices would I take them?. Well, let me explain what I consider a sunk cost, Ruby.

By that time, Ruby was a great decision, it felt so superior to PHP 5, was a truly object oriented language, the syntax for a lot of things makes sense (I still can't get out of my head why array_map and array_filter has different position arguments in PHP), it has conventions for most of the things you do and Ruby on Rails seems like a light in the darkness of web development (a framework easy to install and configure).

However, over time I realized that static typed felt right, I learnt Rust and I see how everything should be, stable and performant. But I had some time invested that I need to use, in this case in my job, so, I'm forced to use Ruby because I have to.

So, how can I compare Vim? I see like knowing how to play an instrument you enjoy, a hobbie, you took some time to learn how to play a guitar and you just can't wait to use it, not because you invested so much time to learn, no, you play it because you enjoy using it. That's right, I enjoy vim (or vim keystrokes). So no, it's not a sunk cost.

Ergonomics

This one seems weird, but I feel comfortable using Vim, let me explain.

When I open an file, most of the time I don't want to edit it right away, I want to read it first and see what I need to do, without Vim or a vim plugin I feel I need to go with careful of not press any key accidentally. Of course, seems silly, considering we have version control, but it's the way I felt it.

Another reason it's that I can navigate and edit the file using the keyboard at the same time, so I don't have to go to the mouse every time I need it, which seems annoying.

Conclusion

Those were my reasons to use Vim, maybe you had your own (if you enjoy Vim as well), or maybe you don't. But I wanted to explain so every time someone else ask I can explain it with a blog post.

Top comments (0)