Saturday, January 21, 2012

Re: Retrieve the argument of a prior Ex mode command

On Jan 18, 3:04 pm, Chris Jones <cjns1...@gmail.com> wrote:
> At the bash prompt, I often use the [Alt+.]¹ keyboard action to retrieve
> the argument of a prior command from the bash history list...

Shame, your slip is showing. ;)

That key combination works in bash's emacs mode. If you use vim a
lot, you may find that

set -o vi

in your .bashrc (or whatever you have) lessens the harshness of the
context switch when using bash. In vi mode, the vanilla command to
retrieve the last argument is an underscore in command mode, so you
type
ESC _
I find that awkward, so I have a .inputrc file:

set keymap vi-command
"]": vi-yank-arg
set keymap vi-insert

which makes it ESC ]

Regards, John

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: