我如何在vim netrw中grep?

Oll*_*edt 3 vim grep netrw

如何在Vim中的netrw中执行grep?ctrl-p可以这种方式使用,grep是否有类似的插件?

例如,当我在目录中时,我想要包含此关键字或该关键字的文件列表。

use*_*497 6

Netrw 确实具有“该功能”;参见:help netrw-star。例如,您可以:Explore */filepat或更广泛地使用以下模式之一:

*/filepat   files in current directory which satisfy filepat
**/filepat  files in current directory or below which satisfy the
            file pattern
*//pattern  files in the current directory which contain the
            pattern (vimgrep is used)
**//pattern files in the current directory or below which contain
            the pattern (vimgrep is used)
Run Code Online (Sandbox Code Playgroud)

使用:Pexplore:Nexplore转到上一个/下一个匹配文件(并@:重复选择的命令);点击<cr>进入文件。