ideasman42
ideasman42

Reputation: 47968

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.

Upvotes: 14

Views: 3460

Answers (2)

Ingo Karkat
Ingo Karkat

Reputation: 172510

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.

Upvotes: 26

Lie Ryan
Lie Ryan

Reputation: 64827

One way to do it is to change makeprog to cat from your text file, pretty sure there's a better way to do it though.

Upvotes: 1

Related Questions