New answers tagged

4

(I've answered this question so many times that I've lost the count, and impossible to find a complete answer in the lot... I'll bookmark this answer this time...) Everything starts with Vim quickfix feature which permits to integrate compilation, and to navigate error messages. The starting point is :make. To navigate error messages, you'll need , :copen, :...


3

This is happening because while :make! doesn't jump to the first error message, it actually sets the quickfix cursor at it. So when you use :cnext it will actually try to go to the second error, which in your case doesn't exist. (You can easily prove that yourself by creating a test case that produces more than one error.) If you use :make! and then want to ...


5

VimScript makes a difference between commands and expressions. Whatever you type in the command-line is a command. Commands can output some text, but they cannot "return" anything, and so they cannot be nested one into another (except string arguments). On the other hand, expression cannot stand in the command-line alone. E.g. 2+2 is an expression, ...


7

Try :h :cfile or :h :cgetfile :cf[ile][!] [errorfile] Read the error file and jump to the first error. This is done automatically when Vim is started with the -q option. You can use this command when you keep Vim running while compiling. If you give the name of the errorfile, the 'errorfile' option will ...


Top 50 recent answers are included