Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've got Syntastic installed in Vim and it is finding errors perfectly (mostly in Python code I'm working on). If I jump around normally in the file I see the errors in the status bar when the cursor is over a relevant line.

What I can't figure out is how to navigate directly between the errors.

I understand that syntastic is loading the errors into a Vim location list and I can make that appear with :lopen, switch to that window, choose a line and hit Enter and be taken to the main window on the right line.

What I would like to do though, is not have the list open, simply be editing away in the file with errors and hit a keyboard shortcut to skip to wherever the next warning/error is.

Is that possible? The docs suggest that :lNext and :lprevious are relevant, but they get me E553: No more items.

share|improve this question

2 Answers 2

:lne[xt] and :lp[revious] are the correct shortcuts.

But :lN[ext] is not the same as :lne[xt]: it's an alternative to :lp[revious].

The message you get is due to the fact that these command don't wrap around when you reach the last or the first error.

The commands you listed in your question both jump to the previous error but chances are you are already on the first error and there's nothing before. use the right commands, keep in mind that they don't wrap around and you'll be good.

Read :h location-list for a complete list of commands.

share|improve this answer

Since :lnext etc. are tedious to type (you usually want to iterate quickly over them, the unimpaired.vim - Pairs of handy bracket mappings plugin provides (among others) short ]l mappings.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.