如何在多个 Eclipse 窗口之间切换(在“分屏”模式下)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9366950/
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
How Do I Switch Between Multiple Eclipse Windows (in "Split Screen" Mode)
提问by machineghost
Eclipse allows you to open more than one text editing "window" at a time to get a "split screen" effect. This is great, but the problem I'm having is that there doesn't seemto be any way to switch between these windows, directly.
Eclipse 允许您一次打开多个文本编辑“窗口”以获得“分屏”效果。这是伟大的,但我遇到的问题是,有不似乎是任何方式将这些窗口之间切换,直接。
Now, you can use the usual commands (Ctrl+Page Down, CTRL+e, ALT+RIGHT, etc.) to switch between specific buffers. In other words, if I have window 1 with A.java and B.java open, and window 2 with C.java open, I can use Ctrl+Page Downto go from A, to B, to C. However, I can't just go from A or B (ie. from window 1) in to C (ie. to window 2), unless I use CTRL+eand type in "C.java".
现在,可以使用通常的命令(Ctrl+ Page Down,CTRL+ e,ALT+RIGHT等),以特定的缓冲器之间切换。换句话说,如果我打开 A.java 和 B.java 的窗口 1,打开 C.java 的窗口 2,我可以使用Ctrl+Page Down从 A,到 B,再到 C。但是,我不能只是从 A 或 B(即从窗口 1)进入 C(即到窗口 2),除非我使用CTRL+e并输入“C.java”。
There are half a million Eclipse commands though, and they're certainly not all labeled consistently, so it's quite possible I'm just failing to find the relevant command. Does anyone out there in SO-land happen to know it?
但是,有 50 万条 Eclipse 命令,而且它们肯定没有一致地标记,所以很可能我只是找不到相关的命令。有没有人在 SO-land 上碰巧知道它?
回答by Panshul
By default, its Ctrl+F6. However, its useful if you map you keys to Ctrl+Tabto switch between open editors like Windows.
默认情况下,它的Ctrl+ F6. 但是,如果您将键映射到Ctrl+Tab以在 Windows 等打开的编辑器之间切换,它会很有用。
You can change your preferred keys in Window>Preferences>General>Keys
and change "Next Editor" to any key of your choice(Ex: Ctrl+Tab). Hope this is what you needed.
您可以更改首选键 Window>Preferences>General>Keys
并将“下一个编辑器”更改为您选择的任何键(例如:Ctrl+ Tab)。希望这是你所需要的。
回答by neric
This can be achieved easily if you are using Vrapper in Eclipse. Vrapperis a Vim plugin for Eclipse. If you are trying to maximize your productivity in Eclipse like we all are, it's well worth the try.
如果您在 Eclipse 中使用 Vrapper,这可以轻松实现。Vrapper是 Eclipse 的 Vim 插件。如果您像我们所有人一样尝试在 Eclipse 中最大限度地提高工作效率,那么值得一试。
Once you got it installed, check out the Split Editor Pluginfor Vrapper. You can then create splits on the fly and switch between them using the standard Vim shortcut: Ctrl-w w
安装后,请查看Vrapper的拆分编辑器插件。然后,您可以使用标准 Vim 快捷方式即时创建拆分并在它们之间切换:Ctrl-w w
Bonus: don't forget to maxmize your editors using Ctrl-m.
If your editor ever loses focus for some reason, regain it by pressing Ctrl-F12
Finally open any file in your project using Ctrl-Shift-r
奖励:不要忘记使用Ctrl-m.
如果您的编辑器因某种原因失去焦点,请按“Ctrl-F12
最后打开项目中的任何文件”来重新获得焦点Ctrl-Shift-r
Edit from anula comment: A useful thing to mention here: Ctrl-w by default binds to closing window, so if you want to use it as in Vim you need to first go to Window->Preferences->General->Keys and unbind "Close".
从 anula 评论编辑:这里要提到的一个有用的事情:Ctrl-w 默认绑定到关闭窗口,因此如果您想像在 Vim 中一样使用它,您需要先转到 Window->Preferences->General->Keys 并取消绑定“关闭”。
回答by Justyna Sidorska
You can install the HandySplit plugin from Eclipse Marketplace and bind its 'Toggle focus between split editors' command to any keyboard shortcut you like.
您可以从 Eclipse Marketplace 安装 HandySplit 插件,并将其“在拆分编辑器之间切换焦点”命令绑定到您喜欢的任何键盘快捷键。