ChatGPT解决这个技术问题 Extra ChatGPT

What is Eclipse's Ctrl+O (Show Outline) shortcut equivalent in IntelliJ IDEA?

I like to use Eclipse's shortcut Ctrl + O which outlines the current source. Is there an equivalent shortcut in IntelliJ IDEA?

It opens a dialog which allows for quick search of methods and fields in a class.

It would aid web searchers a lot if you included a description of the functionality you're after in this question's title. Eclipse's keyboard shortcuts are platform- and setup-dependent.

P
Paul Verest

I haven't used Eclipse for years, so I'm not that familiar with the behaviour you're after - but I believe Ctrl + F12 may do what you want: it is the shortcut for the File structure Popup in the default mapping.

For macOS fn + cmd + F12


See for more shortcuts. At StackOverflow : What are the most useful Intellij IDEA keyboard shortcuts? AT stackoverflow.com/questions/294167/…
For the record, Ctrl-F12 is bound to the File Structure command, available in the top-level Navigate menu.
cmd + fn + F12 for OS X
@loeschg what if cmd + f12 is overridden by the system's volume up?
@LucianNut then you'll probably want cmd + fn + F12 like willy_z suggested.
M
Manu Manjunath

Shortcuts:

Mac: ⌘+F12

Windows: Ctrl+F12

Ubuntu/CentOS: Ctrl+F12

Above works on IntelliJ versions 14 to 2020.


V
Vikas Gupta

Windows : ctrl + F12

MacOS : cmd + F12

Above commands will show the functions/methods in the current class.

Press SHIFT TWO times if you want to search both class and method in the whole project.


This wont work as sometimes you want to search in small sample space.
It is not the answer to the posted question. CTRL+O in eclipse searches in current class/file. CTRL+F12 is the correct equivalent.
The scope is too wide for double shift based search in IntelliJ
u
udondan

On MacOSX 10.8.5, CmdF12 did not work for me. I had to use FnCmdF12


depends upon the preferences you have set for your mac machine
Is the Fn necesssary to reveal the F1-12 keys on your macbook pro with touchbar? You can configured that in the Keyboard System Preferences i.e. always show F keys on the touchbar when in Intellij
J
Jasper

Ctrl + F3 in Idea is the equivalent of Ctrl + O in Eclipse.

The thread is old. Just thought might be useful for someone lookin for the same answer...


Ctrl-F3 is correct IF you're using the Eclipse keymap in IntelliJ IDEA. If you're using the default IntelliJ keymap, it's Ctrl-F12. At least in IDEA 10.
In what I believe is a default keymap, Ctrl+F3 is "Find word at caret".
J
Joshua Goldberg

For Intellij 13 on ubuntu the shortcut for the Structure window is Alt+7 (Cmd+7 on Mac). You can make the window floating to simulate the Eclipse behavior using the top-right setting icon, also unselect the pinned mode option for Esc to work.


The other solutions (Ctrl/Cmd-O) show methods but cannot show fields.
A
Alan

Ctrl + F12 or search "File Structure" in keymap


L
Liang Zhou

Ctrl + F12 works for me. I'm using intellij IDEA CE 12 with default keymap.


M
Michael Scheper

All these answers are subjective, because they depend on your platform, keymap and IntelliJ version.

I believe the 'Structure' tool is what you're looking for. In Idea 13, View → Tool Windows → Structure will open the view, and along the way, the menu will show you the applicable keyboard shortcut for your setup.


N
NIMISHAN

For me, Ctrl + F12 Works really well!


F
Fabrizio

Ctrl+F12 mimics the same functionality.
You can also use this link which gives Eclipse and corresponding IntelliJ IDEA shortcuts.


S
Svilen

For some Linux kinds, and particularly for XFCE (like Xubuntu, Mint XFCE) a lot of default XWin keyboard layout mappings are not working.

This is because they overlap with assigned Window Manager -> Keyboard shortcuts. For the concrete question Ctrl+F12 is assigned to Workspace 12 which I doubt that many use at all.

The solution is to clear those Window manager assignments in Window Manager -> Keyboard tab. As a temporal workaround you may use IDEA actions via Find action Ctrl+Shift+A

There are other overlapping short keys. References:

Difference between Default and Default XWin keymaps

Avoid shortcut conflicts in Linux keymap

File structure on CTRL+F12 dissapeared in 13.1.5


c
cellepo

If you want a persistent/sticky/docked Tool Window instead of a temporary/transient dialog:

Mac: ⌘+7


F
Fabrizio

I think here you can found out the most useful shortcuts for Idea as an Eclipse user... Eclipse "Quick outline" Ctrl+O (Windows) is an equivalent Idea "File Structure" Ctrl+F12!


Link only answers are not useful as they don't guarantee a future user can find the answer. Please include a summary of the information in your answer.
You are right, I didn't think about that... just include some info.
M
Mwiza

It is possible to use eclipse keymap in intellij by clicking ALT+ → keymap. Then select eclipse keymap.


F
Fabrizio

Ctrl+F12 works, because it is for file structure popup, which is similar to showing code in Eclipse.


M
Misha Akopov

As mentioned, I'm using XFCE from windows to remote Ubuntu and CTRL + F12 doesn't work. Since no one mentioned recombine, I'd like to share my solution.

Ctrl + Alt + s` to open settings.

Click Keymap

Input file structure in search box

Right click the item and click Add Keyboard Shortcut

Press keyboard combination you like and I used Ctrl + Shift + o since I came from Eclipse world. The Ctrl + o has been bound already, so I used Ctrl + Shift + o instead

Now, you can use Ctrl + Shift + o to trigger the file structure.

For details about keymap rebinding, please refer to this thread.


d
donfuxx

The shortcuts are: Ctrl+Shift+N for files Ctrl+N for classes


J
Jasper

Ctrl + Alt + L is the one you're looking for.


That brings up a "Reformat Code" dialog for me, using what I believe are default keyboard bindings.
@LuigiR.Viggiano Doesn't ⌘+F12 is overridden by the System's Volume UP command? Or do you know a way avoid it?
Yes, you can change OS X shortcuts, I think in keyboard settings, but don't remember now.
@DenisWeerasiri You need to hold the Fn-button to hit the F-buttons on a Mac. So ⌘+F12 is the same as ⌘+Fn+VolumeUp