4 ms·
There's a long-tail of editor shortcuts I use. I find it a bit wasteful to try and re-implement them in every single program I use that takes text input. Now,
by aidenn0 3y ago
There's a long-tail of editor shortcuts I use. I find it a bit wasteful to try and re-implement them in every single program I use that takes text input. Now, if someone else has implemented it already, then I'm happy to use it, but 99% of the time they will have implemented at most the 100 most common shortcuts that they use, which is unlikely to make me happy.
I should point out that there is exactly one case of someone implemented enough of vim to make me happy, and that's evil-mode. Even there I had to tweak some settings because the defaults were too different from vim (specifically the + and * registers behave completely wrong by default).
- soraminazuki 3y agoBut this is the shell we're talking about, one of the primary interface for development work, so I think the effort is worth it. By relying heavily on edit-command-line, you have to choose between coping with suboptimal keybindings and opening a text editor every time you want to run a command. Also, zsh's vi bindings are surprisingly good. Obviously, it won't be useful as a full-fledged text editor. But it's more than good enough for command line editing. It even has visual mode and registers, which you rarely see implemented in an interpreter. It's true that it requires some configuration though. At least around 20 lines. Zsh's vi mode inherits vi's quirks that are normally disabled in Vim, including the weird backspace behavior in insert mode. Those have to be overridden individually. Text objects and surround bindings need to be explicitly bound too.