如何在 Vim 的 netrw 中执行 grep? ctrl-p可以这样用,有没有类似grep的插件?
例如,当我在一个目录中时,我想要一个包含 this 或 that 关键字的文件列表。
最佳答案
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)
使用 :Pexplore
和 :Nexplore
转到上一个/下一个匹配文件(和 @:
以重复选择的命令);点击<cr>
进入文件。
关于vim - 我如何在 vim netrw 中 grep?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25976167/