:copenした時に表示されるQuickfix Listとは何でしょう。調べてみます。


:h quickfix
1. Using QuickFix commands                      *quickfix* *Quickfix* *E42*

Vim has a special mode to speedup the edit-compile-edit cycle.  This is
inspired by the quickfix option of the Manx's Aztec C compiler on the Amiga.
The idea is to save the error messages from the compiler in a file and use Vim
to jump to the errors one by one.  You can examine each problem and fix it,
without having to remember all the error messages.

In Vim the quickfix commands are used more generally to find a list of
positions in files.  For example, |:vimgrep| finds pattern matches.  You can
use the positions in a script with the |getqflist()| function.  Thus you can
do a lot more than the edit/compile/fix cycle!

:vimgrepの結果もQuickfix Listに格納されてて、getqflist()関数でリストが取得可能なようです。


/tmp $ for i in {1..5};do echo HELLO$i>test_$i.txt;done
/tmp $ vim
:vimgrep HELLO *.txt

:echo getqflist()


Leave a Reply

Your email address will not be published. Required fields are marked *