Unexpected truncation of :vimgrep results in quickfix list
0 reputation · 14 Jul 2021, 14:29 UTC
When using :vimgrep to search a large codebase, the quickfix list is expected to contain every match so that :cnext and :cprev can navigate the full result set. In practice, users suspect that the list may be cut off after a certain number of entries, leaving some matches inaccessible for the remainder of the session.
It is not documented whether Vim imposes a hard ceiling on the quickfix list size, and the pagination commands merely walk the existing list without re‑running the search, so any truncation would be permanent. Setting 'grepprg' to an external tool such as grep or ag may change the source of the output, but it is unclear if Vim then applies its own limit to that data.
Does Vim enforce a maximum number of entries in the quickfix list, and if so, what is the limit and can it be increased? Does using an external 'grepprg' bypass any internal cap, or does Vim still truncate the list after a certain size?