Search code examples
vim

Vim quickfix, using an existing file?


There is a lot of documentation about vim's quickfix but I would like to know:

How I can I use a text file (or copy+paste from a terminal), and put this into a quick-fix list in vim?

All the docs I found so far assume that you run make or vimgrep, but in this case I just want to use a text file created elsewhere.


Solution

  • You're looking for :cfile / :cgetfile:

      :cf[ile][!] [errorfile] Read the error file and jump to the first error.
    

    The file you're reading naturally must be in a format that can be parsed by the 'errorformat' option.