Eclipse HotKey: how to switch between tabs?

后端 未结 22 1218
情书的邮戳
情书的邮戳 2020-11-28 17:10

How can I switch between opened windows in Eclipse? There is Ctrl+F6, but it\'s asking me which one I want, but I want switch it like tabs in browser o

相关标签:
22条回答
  • 2020-11-28 17:36

    On windows if you have a 5 button mouse, you can use forward and back in lieu of ALT+Left and ALT+Right.

    0 讨论(0)
  • 2020-11-28 17:37
    • 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 Mac OS (OSX), Matt Ball 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.

    Matt Ball 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

    0 讨论(0)
  • 2020-11-28 17:39

    I quote VonC response, adding something.

    • Ctrl+PgUp(PgDn) to switch between tabs in the current stack (both editors and view)
    • Ctrl+E to switch between tabs in the current stack, using a filtered list
    • Ctrl+F6 to switch between editors, no matter which stack
    • Ctrl+F7 to switch between views, no matter which stack

    Plus, there is Bug 206299 open to request using Ctrl+Tab for switching tabs instead of Ctrl+PgUp(PgDn).

    • As this would break accessibility, the user should set a preference for this. Perhaps there should be a question in the Welcome Questionnaire during to the Oomph installs.

    If not satisfied, you can assign yourself the Key Binding, from Window > Preferences > General > Keys.

    0 讨论(0)
  • 2020-11-28 17:39

    Right to left : ctrl+ shift + 9 or ctrl + shift + Page Up or ctrl + Page Up

    Left to right : ctrl + shift + 3 or ctrl + shift + Page Down or ctrl + Page Down

    0 讨论(0)
  • 2020-11-28 17:40

    You can use ALT+Left to go to your previous tab, or ALT+Right to go to forward. This method is using tab-switching like history, though, so it will go to the previous tab you had open, and forward if you've gone "back" once or more. A bit weird, I know, but it works. You can always "reset" the history by clicking through every tab once.

    0 讨论(0)
  • 2020-11-28 17:41

    If you go to Preferences (e.g. Window→Preferences) and view General→Keys

    and then search for “Next Tab” and “Previous Tab”, you can remap them.

    Next Tab command in Eclipse Preferences, before rebinding

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