Resource consumption using vi style editors is also lower and easier on our brains compared to other editors, mainly for 2 reasons:
- Muscle memory. It’s like hardware assisted rendering. Finger muscles become your GPU to swiftly render your thoughts as text. You offload menial and boring micro-tasks like mode switching and cursor motion to muscle memory, thus freeing up capacity in your cognitive stream. Capacity we should all use to write stuff that actually make sense, or just simpler, more thought-out and better code.
- Modal workflow enforcement. Shrinks who adhere to the Behavioral-Cognitive school of thought, say that our minds work in a way analogous to a state machine. That is the reason we find ourselves in what we describe as “creative mode” or “party mode” or even “learning mode”; as different memories and skills get loaded and offloaded from our cognitive stream, according to the task we may have at hand.
An editor that enforces a modal workflow will encourage us to be more disciplined and orderly in our thought process. This way, you can only insert text when you’re supposed to be writing new stuff, not being distracted by indenting or formatting. Once done with inserting you may switch the editor (and state of mind) to motion or editing mode, for the purpose of making your code more readable, not coming up with new code. You can focus on formatting, because the creative process is over and you switched away from that, along with your editor.
A modeless editor (emacs, nano) does not enforce this orderly way to create text, and you end up burdening your mind by trying to edit, format, create and debug all at the same time without a clear defined boundary between modes.
Often, different mental modes require different skillsets, knowledge or memories to be “loaded” hot when you need them. Do this for a few hours and you will get a guaranteed headache. And bugs. Or the ocasional “what was I thinking?” line of code.
We all had a hard time adjusting to the modal workflow that vi style editors enforce, because it requires a disciplined, orderly thought process; and usually there is no visual feedback to remind you of the editor’s current mode. Many new users may find this frustrating, blaming a supposed “steep learning curve” for vi style editors.
That learning curve is not that steep. It’s just a hump you need to overcome while you acquire the habit of consciously remembering the current mode and develop your muscle memory.
Once you’re over that hump, you’ll realize the visual feedback is unnecessary because your thought process is sinced with your text editor. And muscle memory is managing the usual commands. And it is such a natural fit for the way the human brain works, that you start to wonder how can anyone write text in any other way. (Cue Neo, after loading the dojo program from the matrix: “I know Kung fu… and vi”)
