4 ms·
I'm a huge vi(m) fan, but still use Emacs-style readline. When editing code in vim, I tend to make several edits each time I'm in edit mode. When at the termina
by tsm 14y ago
I'm a huge vi(m) fan, but still use Emacs-style readline. When editing code in vim, I tend to make several edits each time I'm in edit mode. When at the terminal, all I'll need is "go to front" or "search backwards". And which is easier: Esc+Shift-6+i or C-a? Esc+Shift-/ or C-r? I'm in no way an Emacs ninja, but it's not too hard to memorize the ten or so most common commands. Added bonus: they work in OS X and Qt textfields. Other added bonus: they work out of the box in terminals you haven't configured yourself.
- jlgreco 14y agoI like vi-mode in my shell primarily for j/k to navigate through history (arrow keys just always suck imho, and C-r to search backwards in history is just overkill most of the time) and 'c[motion]', which is what I almost exclusively find myself using to correct things I messed up ('d[motion]' pops up less frequently). 99% of the time those are 99% of the things I use; for that set of features I think the vi sequences are definitely have the advantage.
- pmr_ 14y agoThe Emacs next-line and previous-line bindings C-n and C-p also work well for history navigation.
- jayferd 14y agouhh... try Esc-I and Esc-A. And Ctrl-R still works in vi mode.
- gvalkov 14y agoYou can enjoy the best of both worlds with something like zsh's edit-command-line. I'm very happy with Emacs keys in the shell, unless I need to make a non-trivial edit or type in a multi-line command. In those cases, C-x C-e drops me right into Vim with the current command-line ready for editing.
- don_draper 14y agoAnybody know how to do the equivalent of C-x C-e in vim mode?
- prakashk 14y agoTry ESC-v.