假设我想在光标位置运行grep。我会yiw
然后在命令窗口中使用ctrl-r "
(在:grep
之后)。
使用较少的击键将单词发送到命令窗口的更快捷的方法是什么?
答案 0 :(得分:6)
您正在寻找的是:
<C-r><C-w>
来自:help cmdine-editing
:
CTRL-R CTRL-F
CTRL-R CTRL-P
CTRL-R CTRL-W
CTRL-R CTRL-A
Insert the object under the cursor:
CTRL-F the Filename under the cursor
CTRL-P the Filename under the cursor, expanded with
'path' as in |gf|
CTRL-W the Word under the cursor
CTRL-A the WORD under the cursor; see |WORD|