Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vim quickfix, using an existing file?

Tags:

vim

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.

like image 338
ideasman42 Avatar asked Sep 24 '13 06:09

ideasman42


2 Answers

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.

like image 155
Ingo Karkat Avatar answered Oct 14 '22 03:10

Ingo Karkat


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.

like image 21
Lie Ryan Avatar answered Oct 14 '22 01:10

Lie Ryan