Is it possible to grep the quickfix window in Vim?

后端 未结 4 1474
旧时难觅i
旧时难觅i 2020-12-30 08:11

Let’s say I use the ag.vim plugin to search for the string disabled through multiple files. It returns me some results in the quickfix window:

1          


        
4条回答
  •  无人及你
    2020-12-30 09:07

    My solution to this problem has always been to make the quickfix buffer modifiable by default:

    :autocmd BufReadPost quickfix set modifiable
    

    (The above command is to be put in the .vimrc file.)

    Doing this opens a whole range of possibilities for any appropriate edits, such as removing unrelated entries manually or by filtering using the :global and :vglobal commands, grouping and reordering related entries, adding blank lines or comments in free form, etc.

提交回复
热议问题