6 ms·
Sigh. Hit ‘up’, ‘left’ until at the ‘p’ and type ‘e’ and return. One could also use <c-p>,<c-a> and <c-f> to achieve the same result much quicker.
by awll 9y ago
Sigh. Hit ‘up’, ‘left’ until at the ‘p’ and type ‘e’ and return.
One could also use <c-p>,<c-a> and <c-f> to achieve the same result much quicker.
- DrRobinson 9y agoI prefer "grep !*", which will be replaced by all arguments to the previous command
- zwischenzug 9y agoTrue, I use that too, but gets trickier in the middle of the line.
- mdaniel 9y agoAs a for-your-consideration, C-r leaves the cursor at the matched string when doing reverse search; so "echo helol world", enter, mutter "rats", C-r, o-l-sp, right (just to break the search), and voila you are now positioned on the offending substring
- binaryphile 9y agoYup. The moment you need editing capabilities more sophisticated than those three keys, though, I recommend switching to vi input mode (set -o vi) if you are familiar with vim keybindings. Although tapping Esc is not as quick as Ctrl (or, my chosen alternative, Ctrl-[), you have an entire library of editing commands already at your beck and call. I find that using 'f' or 'F' and '.' more quickly triangulates the problem area of the text in most cases. Of course, if you are an emacs user, more power to you with the emacs bindings.
- DrRobinson 9y agoIMO you might as well run "fc" (if you have vim set as your editor) in that case, rather than changing mode.
- e12e 9y agoI've grown fond of the new :term command in vim (inspired by neovim).
- jwilk 9y agoOr, if you already started editing a line, and decided that you'd rather finish it in a proper editor, you can press Ctrl+X Ctrl+E.
- TheGrassyKnoll 9y agoDidn't know that one, thanks.