DEV Community

Cover image for VIM: This Is How A Love-Hate Relationship Became A Real Bond
Volker Schukai
Volker Schukai

Posted on • Updated on

VIM: This Is How A Love-Hate Relationship Became A Real Bond

Why am I writing this down? Maybe you are one of those crazy people who are contemplating using vim more often, and you might find some helpful thoughts.

My Vim Adventure

I have known vim for a very long time. My first time was truly not uplifting. The first attempts to change something with vim failed miserably.

The concept of two different modes alone was more than strange. I thought at the beginning, this editor must be a bad joke.

Or even worse, an attempt to drive me crazy. Vim had to be the spawn of evil.

Really, I hated it when I had to use vim.

On many productive systems vim was and is already installed and belongs to the on-board tools. So I had to learn to live with it.

Image description

It was certainly not love, but over the years I have come to appreciate vim. Vim has always been there and done its job without complaint.

When I was still working mainly on Windows, vim was also always something like my connection to Linux.

So over the years vim slowly became a friend, not a good friend but a friend.

By the way, vim is also available for windows, although I haven't tried it. Do you use windows-vim, what are your experiences with it? Write your experiences in the comments.

Since my development work revolves around Linux and the most important tools come from there, I switched my main setup to Linux a long time ago. I never warmed up to the Windows subsystem for Linux.

After my switch to Linux, vim became even more essential. For fast editing of files, vim is the perfect partner.

And vim was a good friend I enjoyed working with.

If you want to quickly change a character, nothing beats the speed of vim. Open the file, search for the position and replace the one character with the shortcut r. Then save the file again.

Image description

But for my development work, I still use an IDE.
Why? Because it's even more convenient and faster for me.

This is where I stand. I'm trying to integrate the power of vim into my everyday developer life over the next few months. I'm curious to see if it works.

One thing I have, important to work with vim, is to master the 10 finger system. If you can't do that, you won't be happy with vim.

Image description

I had actually learned to write with the keyboard in school, but never really pushed it. Windows has not really stimulated the use of the keyboard either.

Actually, it's embarrassing when you can't write with the keyboard as a developer.

With the switch to Linux, I have improved my technique but also practice very often, for example on monkeytype.com.

Meanwhile I love vim!

What is your experience with vim? Love, love-hate relationship or contempt? Write something in the comments.

With the use of i3 as windows manager, you can also work much more targeted via the keyboard.

References

Discussion (36)

Collapse
bwca profile image
Volodymyr Yepishev

I will never forget the first time I opened vim and had no idea how to exit it :)

Collapse
raguay profile image
Richard Guay

I was very effecient at killing a process because of this!

Collapse
thatanjan profile image
Anjan Shomodder

That's true. But now I think it is easier to exit vim than other editors.

Collapse
findoff profile image
abnessor aka findoff

First nth times i exiting by C^Z ^M kill %1, then i loved it and now we've been together for 10 years...

Collapse
volker_schukai profile image
Volker Schukai Author

yes, that's really bad.

Collapse
netch80 profile image
Valentin Nechayev • Edited on

For the current programming I get vim featured for:

  1. set list and similar features to detect where predecessors spoiled the source code (tabs, hanging spaces, etc.) (At the current project, to my great pity, forced code formatters aren't exploited.)
  2. Ease to convert between formats and encodings.
  3. Better UX of simple search than for any IDE I've seen so far.
  4. Ease of comparing code chunks when manual merge is needed (after e.g. git cherry-pick, etc.)

OTOH I'm too lazy to convert vim to IDE. Maybe I should finally assign some time for it :) but now I'm switching between IDE (Intellij family or VSCode) and vim.

Collapse
volker_schukai profile image
Volker Schukai Author

thanks for sharing

Collapse
dumboprogrammer profile image
Tawhid

I appreciate Vim but nano is awesome too

Collapse
dumboprogrammer profile image
Tawhid

It's generally faster.Like: to save, exit, search etc all just combination of two keys or a shortcut,
on the othrer hand Vim needs i to edit wq save and so on.Generally speaking I need to press few keys compared to Vim and since I'm lazy I'm into it

Collapse
volker_schukai profile image
Volker Schukai Author

I've never really used nano. Is there a killer feature you like best about nano?

Collapse
katafrakt profile image
Paweł Świątkowski

Most people mention "not being vim" as a killer feature of nano. I don't buy it ;)

Thread Thread
volker_schukai profile image
Volker Schukai Author

:-)

Collapse
netch80 profile image
Valentin Nechayev

Nano is ugly, compared to joe. The only excuse for nano is its tininess.

Collapse
chrisgreening profile image
Chris Greening

After several embarrassing failed attempt at writing some code in a remote terminal I forced myself to use only vim for about a week

It didn't become my primary editor but I can at least function effectively in terminal-only environments now, definitely worth the small learning investment

Collapse
volker_schukai profile image
Volker Schukai Author

Learning something is never wasted time. :-)

Collapse
raguay profile image
Richard Guay

You can read my vim journey here. I’m not perfect still, but I do love vim now. I use the LunarVim config which is very nice. The book Master Vim quickly is my favorite book on vim.

Collapse
volker_schukai profile image
Volker Schukai Author

Thanks for the links and insights, I will read through this when the time comes.

Collapse
zodman profile image
Andres 🐍 in 🇨🇦

after 1 month using github.com/dusans/vim-hardmode

your vim-fu will be more faster than your vscode-fu!

Collapse
volker_schukai profile image
Volker Schukai Author

That's the torture method, isn't it? :-)
But I understand what you mean.

Collapse
andrewbaisden profile image
Andrew Baisden

I want to get better with VIM 😂

Collapse
ferricoxide profile image
Thomas H Jones II

Sounds like you haven't discovered the joy of EMACS. If you truly want to foray into the more Kafkaesque corners of the Twilight Zone, EMACS is the go-to choice of editors.

Collapse
volker_schukai profile image
Volker Schukai Author

While writing this article I was wondering when the first comment on emacs would come. The emacs vs vim wars are legendary.

But all joking aside, I have had emacs on maybe 3 to 5 times in my life and looked at it for a total of 5 minutes. so far I have had no contact with it. You seem to have more experience.

Collapse
ferricoxide profile image
Thomas H Jones II

Been using vi and variants since the late 80s. Mostly settled on vi because it was just "always there" …and, even if vi wasn't (usually because a machine was in single-user mode due to failing to fsck the partition containing the dynamically-linked tools), ex was (which has the same command-set and the same standard-regex that most other UNIX and Linux tools use).

Most of my EMACS encounters were in the 1990s and early 2000s. It seemed to be the preferred-editor for programmers during that period. Haven't really run into anyone using it in the last 15+ years, though – probably as much because everyone that didn't stay with vi (which now seems to be primarily the domain of sys-admins) switched to IDEs.

Thread Thread
volker_schukai profile image
Volker Schukai Author

That's interesting, thanks for the insights.

Collapse
hnrq profile image
Henrique Ramos

That feeling when you discover a Vim feature because you typed a key and were in normal mode

Collapse
kylereeman profile image
KyleReemaN

why you dont use a plugin to use vim with your ide? =)

Collapse
volker_schukai profile image
Volker Schukai Author

Actually i have ideavim in use. I can't tell what it is, but somehow it doesn't feel good.

Collapse
kylereeman profile image
KyleReemaN

hmm i also use ideavim you have to do some config stuff but way better than coding without vim imho

Collapse
thatanjan profile image
Anjan Shomodder

Vim was really hard for me at first. After a weak it was super easy. Now I have hard time typing without vim.

Collapse
volker_schukai profile image
Volker Schukai Author

I know this. I try to use vim shortcuts in many applications. For example vimium for chrome.

Collapse
thatanjan profile image
Anjan Shomodder

I also use vimium

Collapse
maung_maung_oo profile image
Maung Maung Oo

I hated vim and now I am loving it. It was a weird journey.

Collapse
volker_schukai profile image
Volker Schukai Author

thank you for your comment. i think that's how many people feel when they embark on this journey.

Collapse
erdalturan profile image
Erdal Turan • Edited on

Nowadays I can't write something any online platform because they platform doesn't support vim keybinding :( I hope one day every web platform will supporting vim.

Collapse
volker_schukai profile image
Volker Schukai Author

I think that will remain a dream.

Collapse
eomiso profile image
eomiso

When you love vim so much you end up fixing your keymap to a happyhacking keymap LOL