zz from stackoverflow - effecient tip: how switch tabs in Eclipse

本文介绍如何在Eclipse中使用快捷键快速切换编辑器窗口,包括适用于Windows和Mac的操作方法。详细解释了如何使用组合键如Ctrl+E、Ctrl+F6等进行编辑器之间的快速切换,并讨论了在不同操作系统上实现这些操作的方法和限制。同时,文章还提供了针对Mac用户的特定快捷键调整,以及在某些情况下可能需要自定义快捷键以满足特定需求的解决方案。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

you may want to switch from two files constantly, maybe one minute before you are editing a file and a minute later you want to modify the file that has been affected by the change one minute ago. 


Here the shortcut will favor Windows Users, but you can expand the short-cut to Mac as well. 

  • CTRL+E (for a list of editor)
  • CTRL+F6 (for switching to the next editor through a list)
    You can assign another shortcut to the 'Next Editor' key.

are the two official shortcuts, but they both involve a list being displayed.

CTRL+Page Up / CTRL+Page Down can cycle through editors without displaying a list.

What is interesting with that last set of shortcuts is:
they are not listed in the Eclipse Keys shortcuts to be defined.
They may be inherited from the multipage editor, making them an OS specific shortcut.


Regarding shortcuts on Max Os, MДΓΓ БДLL complained in Sept. 2011 to not being able to remap CTRL+Page Up/CTRL+Page Down:

It drives me nuts to not be able to flip through open tabs as I can in pretty much every other tabbed program in OS X (-Left and -Right).

Well, in March 2012, Arthur replied:

, I've just downloaded the latest version of Eclipse (3.7+). I've been able to bind "Previous/Next tab" to (-Left and -Right) when in Editor, which I'm pretty sure I couldn't do before.
So I guess they heard you.
It works just as you expect, tabs going from left to right and vice-versa, not on a history basis or some nonsense like that.

MДΓΓ БДLL confirms:

oh wow, selecting "Editing Java Source" actually worked!
Now, unfortunately this means that I'm SOL if I nav into a non-Java file (JSP, XML, JS, etc.).
The fix for this is to "copy command" for this pair, and select all the "whens" that I want.
So far it's at least working beautifully for Java and JSP files.
This is a major PITA to set up, but it's just a one-time thing.

His exported preferences are available here for you to try.
Once imported, you should see, for all the relevant types of document:

Mac Os key bindings


A Side note on the shortcut, you can as well use the following reply.

On OSX, replace CTRL with CMD for the first two keyboard actions. But you will still need to use CTRL with PgUp or PgDown to cycle through editors. Another set of useful KB shortcuts I just found while trying out some of the suggestions below: you can use ALT+Up or ALT+Down to move an entire line of code.


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值