Vim: open files of the matches on the lines given by Grep?

前端 未结 8 1436
无人共我
无人共我 2021-02-02 16:46

I want to get automatically to the positions of the results in Vim after grepping, on command line. Is there such feature?

Files to open in Vim on the lines give

8条回答
  •  我在风中等你
    2021-02-02 17:13

    Have a look at "Grep search tools integration with Vim" and "Find in files within Vim". Basically vim provides these commands for searching files:

    :grep
    :lgrep
    :vimgrep
    :lvimgrep
    

    The articles feature more information regarding their usage.

提交回复
热议问题