Jump to next error / code highlighted in red

Viewed 37635

When dealing with merge conflicts it is common that the >>>>>> and ====== inserted by DCVS are syntactically incorrect for the file I'm in and show up as highlighted in red. When dealing with merge conflicts it would be useful to have commands to jump to these error. When I type :cnext I just get the message "No Errors". These are Mercurial merge conflicts so I can't use Fugitive, but I generally prefer editing merge conflicts by hand anyway.

Is there a way to jump to the next syntax error in the file? I think these errors are dictated by the syntax highlighting file.

4 Answers

:cn - next compiler message

:cp - previous

:cl - list

You can use ]s (backwards) or [s (forward) depending on which direction you want to go in finding the next error. You need to be in normal mode for this to work but this is just build in vim, no extensions needed.

Related