in vim, how to set “args” to the result of a “grep -l”?

前端 未结 2 1914
遇见更好的自我
遇见更好的自我 2021-02-14 06:08

To illustrate, here\'s how to do it from the command-line:

vim `grep \"hello\" * -Rl`

This opens vim with all the files that have \"hello\" in

2条回答
  •  面向向阳花
    2021-02-14 06:35

    Try the args command:

    :ar[gs] `grep -Rl "hello" .`
    

    If the backticks aren't working for you, are you use you're using a current version of vim?

    :version
    

提交回复
热议问题