The question is not "How" but "Why" you would want to ever do that in the first place;-)
Many years ago I knew a university professor and students said about him he might leave uni occasionally but he sure never leaves Emacs. Some live in Emacs, some live in Vim.
Emacs users live in emacs, but vim users usually live in the terminal, not directly in vim. Good thing there's a terminal version with vim bindings of pretty much every program out there :)
(As I finished writing this, and was about to type ^[fG to submit this reply, I couldn't help but smile a bit)
I live in a different universe to you it seems. The only vim command I know is :q.
Honestly, I tried several times over the decades and walked away with my head buzzing.
PS: I don't live in emacs either!
What I do love in both camps is how the explanations begin... "All you have to do is...[insert irrational (to non-vim/emacs users) command]" which makes me laugh every time.
Love the article, which ironically proves my stance of me keeping well clear.
I know some basic commands and know it well enough to edit git commit messages and interactive rebase (`ddkP` is probably the most advanced command I know). But I've never thought "I prefer this over my regular editor this is amazing". I just don't get the satisfaction.
And of course I'd have to dive deep into the ecosystem in order to get the same benefits that my main editor provides out of the box, like idk, cmd+click to go to definition, or error reporting like squiggly red lines.
> And of course I'd have to dive deep into the ecosystem in order to get the same benefits that my main editor provides out of the box,
To me, vim shines as a modal editor, not an IDE. I use it for two purpose:
1. quick editing configuration files, or single file scripts
2. an editing mode in an IDE (mostly VSCode)
The main benefit of vim is to save you from using the mouse or the touch pad. I touch type, my indexes rest on F and J, and I can do pretty much anything without leaving the keyboard, without using the arrow keys, and keeping my eyes on the screen. It's not something I'd know how to do without Vim. If I'm using the arrow keys, I need extra-time to relocate the "J" key, which breaks the typing flow.
My hypothesis is that vim style work (without moving a wrist even a bit) is the reason people get carpel tunnel. I anecdotally see far fewer (none?) People who don't do vim/emacs getting these injuries. Makes sense as well right? Just like "take a walk and don't sit in the same place" but for your fingers
I don't know about carpel tunnel, but the reason I became interested in Vim/Emacs was due to RSI caused by using a mouse. This was my first job, doing shudders Java-EE (7) web development (no live re-loading, tons of clicking in IDE, manually reloading web-page etc, crappy windows touch-pad etc).
Started learning Rails, drank the Kool-Aid, switched to VIM. I don't use VIM for development at my day-job, mostly just key-bindings in Intellij/VS Code, however, the amount of time saved has been worth the effort, and no RSI (also thankfully am able to use the fantastic track-pad on mac and a trackball for anything else).
Lately I've been feeling the pull to learn Emacs after learning about ORG-Mode and the extensibility of the software... unfortunately, the time investment here is likely to have no real benefit in my (current) work as a Java dev. Sigh, time to browse the who's hiring thread.
Using Vim has helped my finger/wrist/arm/shoulder/neck pain and soreness, but you're on to something in that the real problem is probably more repetitive motions than any specific motions.
But Vim (and emacs) solves the repetitive motion problem by providing several means of readily repeating commands.
Most people seem to both type and use their mouse much more slowly than I do. And they also don't often have to (or want to), e.g. cleanup thousands of rows in an Excel worksheet, or have to repeat some kind of action in an app or web app dozens of times.
But I hate using my mouse generally. There are very few times where I want to use a mouse and having to use one, instead of being able to use the keyboard, is endlessly frustrating.
Thankfully, there are several great 'vi-style' browser extensions and there's even [Vimac](https://vimacapp.com/) for MacOS, tho I haven't tried the latter yet.
Maybe that's a bit like saying that running shoes are harmful because people with running shoes sustain running-related injuries more often than the average person, who in reality just doesn't run as much.
Mileage may vary depending on language support, but vim does have a go to definition feature[1][2]. I believe there is also out box error checking for some languages, and if that is not enough for you (and at the risk of offending a large number of vim purists), there is a fantastic plugin called ALE[3] that will likely provide you with what you want.
If you don't like vim for that you can point to another executable by setting gitconfig core.editor to an executable command which starts an editor of your choice. Mine points to Notepad++ (Windows box with msysgit installed).
text objects are a big reason for the satisfaction for me. I spend a fair amount of time moving code around and I like being able to say "delete everything in this indentation level and copy it" in 3 keystrokes. It's pretty sweet when you're use to it and you have it customized to do what you want (which takes time and isn't for everyone).
I honestly don't know how vim deals with unsaved changes upon shutdown and don't use it enough to look that up, so that's why I'll first exit.
As to why shutdown: cultural thing in the end. I was raised with the idea that wasting is bad (and objectively speaking it's very hard to argue with that) so if I don't need the machine running after I'm done with it, I just can't stand the idea of the thing using energy literally for nothing.
Depends on how you configure your swap, backup and undo files. You can have all the extremes from "everything is lost" to "everything is saved" if you suddenly kill the vim process.
Many years ago I knew a university professor and students said about him he might leave uni occasionally but he sure never leaves Emacs. Some live in Emacs, some live in Vim.