在光标处发送一个单词用于作为arugment with:command的最快方法是什么?

wiz*_*zup 1 vim

假设我想在光标位置运行grep.我会做yiw,然后ctrl-r "在命令窗口(后:grep)使用.

使用较少的击键将单词发送到命令窗口的更快捷方式是什么?

rom*_*inl 6

你在寻找的是:

<C-r><C-w>
Run Code Online (Sandbox Code Playgroud)

来自: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|
Run Code Online (Sandbox Code Playgroud)