Bill Joy's greatest gift to man – the vi editor (2003)
For those who do not understand why people are fanatical about vi, here
are some reasons:<p>Vi is keyboard only. This means that actions with the mouse are optimized through the keyboard. There are "hotkeys" for most
tasks you use with a mouse.<p>Vi has the idea of objects. Words, lines and paragraphs are objects you
can operate on.<p>Vi defines a "language" for operating on objects. For instance, 'd' is
delete. You can delete a word using 'dw'. You can delete 5 words with
'5dw'. Another example: deleting a line is 'dd'. Delete 5 lines with '5dd'<p>It is a modal editor. At a basic level there is an "edit" (insert) mode,
a "navigation" (normal) mode, and a "selection" (visual) mode.  The power
of a modal environment means that commands and hotkeys now have a context
and do slightly different things in different modes. While this may be
overwhelming, once all these modes are ingrained in you, it allows you to
be extremely efficient since you do not have to remember new hotkeys. For
example, in the navigation mode, you can apply the 5dd to delete 5 lines.
In selection mode, use '5w' to select five words. 'd' now deletes
everything in the selection. If you've ever struggled to manage and
remember your hotkeys, modal environment is your friend. (set this up in
mac using something like hammerspoon.)<p>It includes some really nice out of the box features: Macro system to save
you time with repetitive tasks, regular expressions search and replace,
time travel through your edits, it stores your edits in a tree so you can
navigate to your changes even after multiple undo/redo. "." repeats the last change. You can also apply a number before it to
repeat the change n number of times. I am surprised how often I use this
that this is and this is first thing I miss when using another editor.<p>Vi is worth learning as it will improve your productivity. This is
especially important if you have to edit a file on a remote server. Vi is
installed on every unix distribution. Many cli tools and shells have a vi
mode. This allows you to take the vi 'language' to all these cli tools for
more productivity.<p>For those who struggle to learn, I highly recommend Vim Adventures. After
that, force yourself to use vi for your every day edits and it'll be
second nature in a couple of weeks.<p><a href="https://vim-adventures.com" rel="nofollow">https://vim-adventures.com</a>