Search code examples
pycharmshortcutjetbrains-idekeymaps

Jump to next above/below class declaration?


Alt + Down or Alt + Up will jump to next/previous method relative to your current cursor position. Is there a similar functionality for jumping to the next above/below class?


Solution

  • The default keymap doesn't give the exact functionality you want. Cycling previous/next classes, like you cycle the methods, isn't possible. The closest thing is opening a list using Ctrl+F12 with all the members in the module.

    • Go to Settings Ctrl+Alt+S and select Keymap.

      • In Keymap -> Main Menu -> Navigate there's Ctrl+F12 that gives the list of objects in the file.

      • In Keymap -> Main Menu -> Navigate -> Navigate in File are the Alt+Up and Alt+Down shortcuts to cycle next/previous methods as you mentioned in the question.