Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can i go to the error after executing make in VIM?

Tags:

c++

c

vim

makefile

Can i go to the line of error , while compiling a C or C++ project ? Usually by executing make , and parse the error string , and go to the specific file , and the line with errors.

Is there already an usable plugin ?

like image 289
daisy Avatar asked Oct 26 '11 06:10

daisy


3 Answers

Yeah this is already buit into vim. After typing :make type :cwindow to bring up the error list. You can then navigate to the errors using this window.

like image 81
sashang Avatar answered Oct 21 '22 21:10

sashang


You can as well after :mak or :make do :cope to open the window with compiler output and once you are done :clo to close it.

Use :cn and :cp for jumping to next and previous error or when you are in the window go to line that has the error with file name, line & column and press enter to jump there.

like image 40
stefanB Avatar answered Oct 21 '22 22:10

stefanB


IIRC, this functionality is built into vim. A quick google search revealed this useful link. This describes vim's features for navigating the errors after a make.

like image 4
James Avatar answered Oct 21 '22 21:10

James