[Insight-developers] vim error commands
Luis Ibanez
luis.ibanez@kitware.com
Mon, 29 Apr 2002 10:48:46 -0400
Hi,
emacs users: please ignore this message :-)
vim users: apologies if you already know this.
Here are some Vim commands for error manipulation
during compilation. They can be quite useful when
dealing with template error messages.
The following will work better on Linux than in Windows....
Thanks to the 'quickfix' mode in Vim, it is possible
to invoke "make" from inside the editor and receive
the list of errors from the compiler.
All this commands are invoked with ":"
:make invokes make and redirect the error output to vim.
:cc jumps to the current error
:cr jumps to the first error
:cn jumps to the next error
:cp jumps to the previous error
:cl list all the errors
:cope opens the errors in a buffer and from it you can
navigate through the errors
:ccl closes the errors window
If you are using gvim (Vim with gui enabled) these
commands are available under the "Tools" menu option
in the menu bar.
Once the error window is open in Vim, it is useful
to enable the syntax coloring with
:set syntax=cpp
That can help to deal with the long type names
generated by templates.
Luis