DEV Community

Discussion on: Exploring Vim

vintharas profile image
Jaime 🔥🧙‍♂️🔥 Author

Hi! 😊 Thank you very much for leaving a comment! :D

My intent wasn't to be religious in any way but to share something I find useful, interesting and which I think has helped me become a more productive programmer.

I used this quote:

Vim is for programmers who want to raise their game.

Because it perfectly describes the feeling/intent that I had when I started learning vim. I love to continuously examine how I am doing things, see where I feel pain and try to improve. So you could say that I'm always for raising my game. At the time when I learned vim, I was super proficient with Visual Studio and ReSharper but I felt that my flow was often stopped or slowed down when doing small refactorings (like at the code block or code line level). It that context, vs(vim) was a great combination with ReSharper. And, even if it didn't improve my productivity measurably (I never went back or exhaustively quantified the difference between before and after adopting vim), it did make me feel like a coding wizard as I became a lot more fluent when coding (which I think is a good thing :D).

I certainly didn't mean it as exclusionary or demeaning of anyone using other editors.

Editor wars are pointless

Totally agreed

you'll probably click faster than you touch-type

No :) I can give you a lot of examples where keyboard is superior to mouse movement + click combination. The click is not the slow part of using a mouse. The slow part is lifting your hand from the keyboard, grabbing the mouse, moving the mouse where it needs to be, clicking and then moving your hand back to the keyboard. This is not only slower, it also breaks your flow.

  • select a word with the mouse, press delete, type again vs cw{insert}<ESC>
  • open a tab with a mouse vs type gt
  • go look for a file in the file explorer with the mouse vs C-p {start typing filename} <ENTER>
  • go open the menu -> File -> New -> click, type name, enter vs :e {filename}
  • etc... I don't think there is anything that you can do faster with a mouse that you can do with a keyboard (perhaps resizing a window? :D)

Note that keyboard superiority is not limited to vim. Any editor provides shortcuts because they're just faster than using the mouse. Learn your editor shortcuts and you're going to be infinitely more proficient than you were when you used the mouse.

I think that we just don't see things alike and we don't need to discuss it further. :D

tux0r profile image

Then again, "5 lines up, 83 columns right, select the next word" is still faster with the mouse because you can just click there. ;-)

Otherwise, I mostly agree.

Thread Thread
vintharas profile image
Jaime 🔥🧙‍♂️🔥 Author

hehe you are right. Using counts is not very efficient. It's ok for 2-3 items but beyond that is more time consuming (it's just hard to count words/characters by just looking at them).

For that particular use case, you can use pattern searches:

?{pattern}<Enter> and you're there. That in combination with n/N to repeat last search forward or backward and it's pretty much instant.

?{pattern} to search upward and /{pattern} to search downward