将 Grep 输出中的文件打开到 Vim 的 -o -mode [英] To open files in Grep's output to Vim's -o -mode

查看:14
本文介绍了将 Grep 输出中的文件打开到 Vim 的 -o -mode的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将文件列表放到 Vim 的 -o -mode 中?

我有一个文件列表作为 Grep 的输出.我运行不成功

I have a list of files as Grep's output. I run unsuccessfully

grep -il sid * | vim -o

2

grep -il sid * | xargs vim -o

3

grep -il sid * | xargs vim

4

vim -o `grep -il sid *`

5

vim -o | grep -il sid *

推荐答案

第二个对我有用.第三个也是,虽然一开始你只能看到一个文件.在大多数情况下,4 与 2 相同.第一个和最后一个不应该按设计工作.

Second one works for me. Third too, although you get only one file visible at the start. 4 is the same as 2 in most cases. First and last should not work by design.

这篇关于将 Grep 输出中的文件打开到 Vim 的 -o -mode的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆