My open love letter to Vim
I’m in love. Still. And for almost 10 years already. We’ve been through thick and thin. Oh my dear Vim code editor, you never let me down, and I promise I will continue on my conversion mission for growing our beloved family, for making more people feel the absolute enlightment.
What is Vim?!?!
I'm sure you must be kidding ... No? Head over to Vim Casts and get yourself an idea of Vim (the best editor in the world).
Isn't this a bit nerdy?
You are so right, and I sincerely ask you to not tell my wife about this article. She might question our marriage.
But in fact, this article is about why Vim is (still) an awesome editor. Even with all of its competitors like Atom, VS Code, Sublime Text and many more.
Old but gold
Vim 1.0 was created in 1988 — 30 years ago! Bram Moolenaar started hacking on it when I was a toddler, not having the slightest idea of what hjkl means — and why it's better than those 2000 meters far away cursor keys.
Vim is one of those tools that are irreplaceable once you have mastered them. Sure, it's "just an editor", but it's a damn good one. It follows a well-thought-out concept and puts a lot of effort into consistency. Because of that, and after some initial trouble, it's insanely easy to use and very powerful.
Modes, commands, markers, buffers, registers…
There's quite some stuff to learn when you want to dive into Vim. There are 2 minimum requirements that you have to meet.
- Huge (huge!) amounts of patience.
- Calmness.
So better check your sanity before giving up habits of your old "editor" "workflow".
Vim is complex, and you most likely won't be able to just launch it and start typing. It's not designed like that. It's a tool for power users, and power user tools are — uh — powerful. Therefore not self-explanatory or intuitive in the beginning.
Notepad, for instance, is easy to get into, but it's everything but powerful. In Atom it's also easy to get started. But when you want to improve your workflows, you'll have to learn its concepts, shortcuts and install plug-ins. The same counts for all the other editors that have some sort of capabilities.
Just because Vim is packed with tons of stuff doesn't mean it's a tough editor, it just needs time to get used to.
Editing is fun and can be massively optimized
If you are a developer, you know what optimization means. You have some code that performs bad, so you have to make it better. If you are no developer, you are most likely optimizing other parts of your (work) life, e.g. choosing a proper to-do list tool to get more stuff done.
Some people even buy expensive keyboards to type faster — and that's for a good reason!
But I almost never hear people complaining about their editing workflow. It's like people just don't know that editing can be good or not so good. Or in other words: Editing is optimizable!
Whether you are a developer, author or someone who writes a lot of letters or e-mails:
Typing text/code is what you do in large portions of your daily activities. Isn't it a good idea to optimize it?
Now go and optimize yourself!
Like I said, Vim has awesome concepts, which makes the whole editor predictable and understandable. And without doubt, Vim is the best candidate at least in that regard.
Vim is designed as a toolset of commands and possibilities that can be combined to execute really powerful editing operations, like massive editing, recording and replaying macros, navigating like a wizard, editing multiple files in multiple windows, changing words, sentences, paragraphs and code blocks like a young God, and much more.
Just head over to www.vim.org or neovim.io and grab your copy and try it out. Especially for Vim, there are some resources online you can use to teach yourself the basics, e.g. Open Vim, Vim Adventures, Vim Genius or even good ol' Vimtutor which is included in every Vim distribution I know of.
Ad warning: If you know the German language, you might as well want to check out my online video course about learning Vim. I cover all the basics and quite some advanced stuff there. Save some coins by using the coupon code MEDIUM.
All in all, please take care of your editing skills and workflows, it's really worth optimizing and very often overlooked by lots of people. Whether you choose Vim or another editor is up to you. But don't complain when you end up in hell for not choosing the best of the best, you have been warned. ;-)