What is the shortcut in IntelliJ IDEA to find method / functions?

前端 未结 16 692

I know that Ctrl + N is to find classes and it is very useful. But what about methods?

相关标签:
16条回答
  • 2021-01-29 17:54

    If you click on a method, you can do Ctrl + B to go to that method's declaration. Similar to F12 in MS Visual Studio.

    0 讨论(0)
  • 2021-01-29 17:55

    Ctrl + Shift + Alt+ 7 after selecting the method

    0 讨论(0)
  • 2021-01-29 17:59

    Ctrl + Alt + Shift + N allows you to search for symbols, including methods.

    The primary advantage of this more complicated keybinding is that is searches in all files, not just the current file as Ctrl + F12 does.

    (And as always, for Mac you substitute Cmd for Ctrl for these keybindings.)

    0 讨论(0)
  • 2021-01-29 18:02

    If you just want to look for methods:

    On mac OS X 10.5+ binding, it is Alt + + O

    By Default XWin Key binding, it is Shift + Ctrl + Alt + N

    You can also press double SHIFT then, you can search anything (not only method, but also class, files, and actions)

    0 讨论(0)
  • 2021-01-29 18:07

    Intellij IDEA 2017.3.4 - 2018.2 (Ultimate) on OSX

    CMD + fn + F12

    will show all members of the current class in a popup window, then you can search method in that class.

    BUT, this answer is depends on your Keyboard setting. If your keyboard setting in

    System Preferences > Keyboard > Use all F1, F2, etc. keys as standard function keys

    is selected, then the shortcut becomes

    CMD + F12

    0 讨论(0)
  • 2021-01-29 18:07

    Slightly beside the actual question, but nonetheless useful: The Help menu of Intellij has an option 'Default Keymap reference', which opens a PDF with the complete mapping. (Ctrl+F12 is mentioned there)

    0 讨论(0)
提交回复
热议问题