Vim已经在当前打开的文件中进行增量搜索,但是你能做到吗? 跨多个文件的增量搜索?
答案 0 :(得分:1)
AFAIK这是不可能的。但是,您可以开始键入打开缓冲区中的单词并按 ctrl-x ctrl -n 开始在所有打开的缓冲区中搜索这样的单词。
答案 1 :(得分:-1)
来自:help grepadd
*:grepa* *:grepadd*
:grepa[dd][!] [arguments]
Just like ":grep", but instead of making a new list of
errors the matches are appended to the current list.
Example: >
:call setqflist([])
:bufdo grepadd! something %
The first command makes a new error list which is
empty. The second command executes "grepadd" for each
listed buffer. Note the use of ! to avoid that
":grepadd" jumps to the first error, which is not
allowed with |:bufdo|.
An example that uses the argument list and avoids
errors for files without matches: >
:silent argdo try
\ | grepadd! something %
\ | catch /E480:/
\ | endtry"