3 ms·
The vi editor was designed for slow terminals and a particular keyboard without arrow keys (ADM-3A terminal keyboard), yet after 46 years there is no shortage o
by atemerev 4y ago
The vi editor was designed for slow terminals and a particular keyboard without arrow keys (ADM-3A terminal keyboard), yet after 46 years there is no shortage of vi fans that insist that modal editing (an adaptation for slow terminals) and hjkl (an adaptation for a keyboard that used to have no arrow keys) are inherently superior for all modern editing needs. :)
- chongli 4y agoTerminals remain dreadfully slow compared to the speed of thought. People prefer vi because it's the best editing paradigm discovered so far which achieves one thing: reduce, as much as possible, the delay between a thought in mind and a corresponding change in the document. Other paradigms put too many context switches between my thoughts and the changes I want to see. I do not want to take my hands off the home row to reach the cursor keys, or God forbid the mouse. I also do not want to destroy my pinkie finger with endless usage of modifier keys. So that leaves me with vi (and kakoune).
- dragandj 4y agoWhy would anyone use pinkie for modifier keys? Nowadays you can reconfigure positions of CTRL and Meta and Shift to your taste. I happily us Emacs without ever stretching my fingers, because all these keys sit happily under my thumbs (literally).
- chongli 4y ago"First you need to buy a custom keyboard that puts all the modifier keys under your thumbs" is not a very enticing pitch for a text editor. Doubly so for those of us on laptops where the idea of carrying around an external keyboard is a non-starter.
- atemerev 4y agoWell, for me, to record my thought as quickly as possible, it is vitally important for the editor to always be in the input mode, I can’t lose time to remember the modal context I am currently in (and emacs is hardly better, as it can suddenly switch its focus to some command buffer, and not come back unless some specific action is taken).
- Lio 4y agoI don’t want to advocate for you to use something that doesn’t fit your preferences but for the record Vim/NeoVim can work that way too. You can start it in Insert mode and you can have it stay in Insert mode as you run a single command using C-o. There’s also a plethora of Insert mode ctrl shortcuts which are worth learning in addition to Command mode stuff. If you’re on the emacs path you'll be able to do all the same stuff, just differently. The major point is that terminal based software is fully keyboard driven and you can commit the shortcuts to muscle memory and compose them.
- atemerev 4y agoThat’s interesting, thank you.
- chongli 4y agoYour complaint would make sense if all of my text editing consisted of sequential writing in a stream-of-consciousness fashion. But then, I wouldn't need a text editor at all since I can do that with cat. In reality, I rarely ever do that kind of writing. 99% of the time I am working on some existing document, such as a source code file, and so I need an editor optimized for random access editing. Vim is that editor. As a long time vim user I am in normal mode all of the time. When I sit down at a vim session I haven't touched in a while I press escape a few times to make sure I'm in normal mode. Then while I'm editing I am continuously typing various motion and change commands, some of which enter insert mode, and then quickly making the change before escaping back to normal mode. Because I am in normal mode all the time (or perhaps vice versa), I spend most of my time jumping around the file and reading what is already there. Extremely rarely am I looking at a completely empty file where the only useful thing to do is start inserting text. And even then I am often typing some command to pull in text from another file or as the result of a bash command.
- bluenose69 4y ago> I also do not want to destroy my pinkie finger with endless usage of modifier keys. This is exactly why I switched from emacs to vim, after a couple of decades of emacs use. I decided I'd put up with slow editing for a few days, as I forced myself to use vim. (It was that or not type for a week or so.) After a few days of frustration, vim started to grow on me. Swearing became less frequent. A month later, I was perhaps 75% as fast in vim as in emacs, and my hand pain had completely vanished. And a few months after that, I noticed that I was really quite fast in vim -- certainly faster than I was in emacs -- and that the constant puzzle-solving (finding the action that required the fewest keystrokes) was intriguing. Using emacs seems to me to be an exercise in remembering, whereas using vim is more an exercise in thinking. Part of the appeal is that this thinking does not interfere with the thinking involved in writing. It's a bit like driving a standard car: the extra cognitive demand (do I need to shift now? are the revs right yet? am I at the biting point?) seems to be handled by a different processor, and having that processor working makes the experience more enjoyable.
- mightybyte 4y ago> Using emacs seems to me to be an exercise in remembering, whereas using vim is more an exercise in thinking. This. This right here is one of the best characterizations of the vim/emacs debate that I have ever heard.
- aj7 4y agoSorry, but HTF did we get from differential equations to eMacs and Vim? (My Twitter personality is showing through.)
- zadwang 4y agoI think the reason Vi wins even at infinite terminal speed is that it minimizes the things you need to type to express what you want to achieve/edit to computer. This was motivated by slow terminal speed in the beginning but is also addressing the bottle neck of human computer interface.