vim is vi(improved)
vim is a powerful way that allows you to transform your thoughts into action in as little keystrokes as possible. In fact, the subtitle of the book Practical Vim is this:
“Edit Text at the Speed of Thought”
With that said, vim has a steep learning curve that often does not feel worth it if you are used to Command+c to copy, Command+v to paste and you like thinking while moving your mouse.
Its mostly mindful awareness
If vim has done one thing, its made me very cognizant of what I am trying to achieve. The emphasis on achieving as much in as little time, and the freeing of mental overhead from reaching all over the place, allows me to approach programming much more mindfully.
But as of today, “How to exit the Vim editor?” has 2644 votes on Stack Overflow!!!
Heres a tiny walkthrough.
vim intro walkthrough
Step 1: change var to const
To change var to const you simply need to type: ceconst<Esc>
where: c
means change, e
means until end of word, <Esc>
takes you out of insert mode
Step 2: delete the word function
To get to the word “function” type: ff
where: f
means find, the second f
is the letter to find
To delete a word: de
Step 3: add an arrow behind the opening curly brace
To get to the char “{” type: f{
To insert “=>” type: i=><Esc>
where: i
means insert, =>
is your input
Notice that we never touch the mouse! We never reach for the arrow keys.
In fact with the right shortcuts, you never take your fingers off the home keys. It’s really hard to state how much this frees your mind.
Until Elon Musk’s Neurolink allows as to change modes AND input text by brain implants, vim will be how to change text.