vimgrep
:vim[grep][!] /{pattern}/[g][j][f] {file}
:vim[grep][!] {pattern} {file} ...
如
:vimgrep /hello/g %
:cope[n] [height]
:ccl[ose]
:cw[indow] [height]
用:cw打开quickfix list查看搜索结果
lvimgrep
:lv[imgrep][!] /{pattern}/[g][j][f] {file} ...
:lv[imgrep][!] {pattern} {file} ...
如
:lv /hello/g %
:lop[en] [height]
:lcl[ose]
:lw[indow] [height]
用:lw打开location list查看搜索结果