I am looking for any way to navigate between errors in IntelliJ.
I know how to jump INSIDE one file. And I found a bunch of macros, editor extensions, etc. plugins to extend the functionality, but there seem to be nothing to help me in these scenarios:
I remove method from baseclass.
I hit rebuild, so nice, now 20 files have errors as expected.
Now I have to manually click either on the red error in the make info to open the file, or on the file in the project tree (marked red) to open the error file. Once inside the file its easy, F2, some ALT+ENTER, fixed.
So any way to jump TO NEXT ERROR FILE.
Or any way to navigate between (not open) files by keyboard. E.g. Open next file in tree structure, etc..
In the editor, press Ctrl+Tab . Keep pressing Ctrl for the Switcher window to stay open. Use Tab to switch between tabs and other files.
Press ⌘G (macOS), or F3 (Windows/Linux), to move to the next occurrence of a word. Pro tip: Use ⌃⌘G (macOS), or Ctrl+Alt+Shift+J (Windows/Linux), to select all occurrences of the same word.
In Eclipse, you press CTRL + SHIFT + O “Organize Imports” to import packages automatically. For IntelliJ IDEA, if you press CTRL + ALT + O “Optimize Imports”, it just removes some unused imports, never imports any package.
Sometimes code formatting can get out of sync, but there's an easy fix in IntelliJ IDEA. You can use ⌘⌥L (macOS), or Ctrl+Alt+L (Windows/Linux) to reformat a selection of code according to your reformat settings.
With IntelliJ 2017.2.2, F2 is mapped to "Next Highlighted Error" per default. Make sure to focus the Project editor first. Similarly Shift + F2 is mapped to "Previous Highlighted Error". The mappings mentioned in the other answers do not work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With