Re:Bash One-Liners Explained, Part V: Navigating around
by tsm on Tuesday November 27, 2012 @02:31PM
(#4838389)
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.
[ Parent
| on HN ]
Re:Bash One-Liners Explained, Part V: Navigating around
by jlgreco on Tuesday November 27, 2012 @02:45PM
(#4838496)
I 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.
Re:Bash One-Liners Explained, Part V: Navigating around
by pmr_ on Tuesday November 27, 2012 @04:49PM
(#4839317)
The Emacs next-line and previous-line bindings C-n and C-p also work well for history navigation.
Re:Bash One-Liners Explained, Part V: Navigating around
by gvalkov on Tuesday November 27, 2012 @06:22PM
(#4839910)
You 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.
Re:Bash One-Liners Explained, Part V: Navigating around
by don_draper on Wednesday November 28, 2012 @07:35AM
(#4842194)
Anybody know how to do the equivalent of C-x C-e in vim mode?