Today quickfix and grep facilities of VIM are in my favorite list. TagList extention occupies the whole window and does not show all procedures you might want to have a list of. So I came to grep utility incorporated in VIM and quickfix ‘buffer’ which in extend to normal buffer can be quickly hidden, stores history of latest 10 searches and allows to jump to any item in the list.

GREP

:grep what_am_i_looking_for *

Nothing special. Just as printed in command line.

QUICKFIX

after populating quickfix ‘buffer’ the way of navigating through it is with this (general) commands:

  • :cn (next) / cp (previous) item in the list
  • :cope[n] / ccl[ose]  – opens and closes the quickfix window
  • :cl[ist] – show the list of all occurences
  • :col[der] / cnew[er] – navigate to older / newer list in the list stack

All commands can be appended with the number(s), which further stipulates what item(s) / list(s) are affected or included in the output, see documentaion.

The quickfix facility is described in full in built-in help in VIM as well as online. It’s primary design was targeted to facilitate edit-compile-edit style programming and hence it’s functionallity goes well beyond what has been pointed to above. The tool is made with excellent level of abstraction and can be employed in various scenarios. On this mechanism many plugins have been built, such as grep.vim