Java IntelliJ IDEA 中 Eclipse 的 Ctrl+O(显示大纲)快捷键是什么?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1945213/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-13 01:40:55  来源:igfitidea点击:

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

javaeclipseidekeyboard-shortcutsintellij-idea

提问by Boris Pavlovi?

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

我喜欢使用 Eclipse 的快捷方式Ctrl+ O,它概述了当前的源代码。IntelliJ IDEA 中是否有等效的快捷方式?

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

它打开一个对话框,允许快速搜索类中的方法和字段。

采纳答案by Andrzej Doyle

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

我已经多年没有使用 Eclipse,所以我不太熟悉你所追求的行为 - 但我相信Ctrl+F12可能会做你想做的事:它是默认映射中文件结构弹出窗口的快捷方式。

回答by Anonymous Coward

Ctrl+ Alt+ Lis the one you're looking for.

Ctrl+ Alt+L是你要找的人。

回答by Karthikkannan

Ctrl+ F3in Idea is the equivalent of Ctrl+ Oin Eclipse.

Ctrl+F3在思想是相当于Ctrl+O在Eclipse。

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

线程是旧的。只是认为可能对寻找相同答案的人有用...

回答by Liang Zhou

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

Ctrl+F12对我有用。我正在使用带有默认键盘映射的 Intellij IDEA CE 12。

回答by Alan

Ctrl+ F12or search "File Structure" in keymap

Ctrl+F12或在键盘映射中搜索“文件结构”

回答by vikasing

For Intellij 13 on ubuntu the shortcut for the Structure window is Alt+7(Cmd+7on 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 Escto work.

对于 ubuntu 上的 Intellij 13,结构窗口的快捷方式是Alt+ 7(Mac 上的Cmd+ 7)。您可以使用右上角的设置图标使窗口浮动以模拟 Eclipse 行为,也可以取消选择固定模式选项以Esc使其工作。

回答by user3495241

The shortcuts are: Ctrl+Shift+Nfor files Ctrl+Nfor classes

该快捷方式是: Ctrl+ Shift+N的文件 Ctrl+N上课

回答by Michael Scheper

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

所有这些答案都是主观的,因为它们取决于您的平台、键盘映射和 IntelliJ 版本。

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

我相信“结构”工具正是您要找的。在 Idea 13 中,视图工具窗口结构将打开视图,同时菜单将显示适用于您的设置的键盘快捷键。

回答by daazakali

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

在 MacOSX 10.8.5 上,CmdF12对我不起作用。我不得不使用FnCmdF12

回答by Vikas Gupta

Windows : ctrl+ F12

视窗:ctrl+F12

MacOS : cmd+ F12

苹果系统:cmd+F12

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

以上命令将显示当前类中的函数/方法。

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

SHIFT如果要在整个项目中搜索类和方法,请按两次。