17

I'm wondering if Eclipse has any shortcut to close all tabs except the pinned one. I use the CTRL+Shift+W shortcut every day to close current tabs but it closes all the tabs no matter they were pinned or not. Do Eclipse have any settings for this shortcut to close only not pinned tabs, or does exist another shortcut to achieve such result?

Edit: I forgot mention I use Eclipse Indigo.

0

2 Answers 2

27

Press CTRL+Shift+E and you will get the Switch to Editor view as shown below.

Switch to Editor View

Now use the keys Up or Down to select the tab which you want to stay opened and press the Tab key two times so that the button Invert Selection is focused. Then press the Enter and two times Tab key. Hit the Enter key again to close all other tabs in editor.

1
  • 1
    Instead of "two tabs + enter" two times, you could do alt + i and alt + c. Commented Jan 28, 2016 at 15:06
11

If you right click on your window there is an option "close others" it should work for you,

If you want a shortcut for it its simple to create one, go to >Window > Preferences > General > Keys , search for "close others" then in the Binding filed enter any shortcut key you want, and in the when dropdown; select "In Windows", then apply, OK , Finish.

3
  • 2
    I already know about this option, but it still closes pinned tabs. It doesn't close only the current tab which is not sufficient for me. +1 for you :)
    – tomrozb
    Commented Apr 8, 2013 at 16:03
  • 1
    What do you mean pinned tabs?
    – Elye M.
    Commented Apr 8, 2013 at 18:02
  • 1
    Maybe I've used the wrong word - I mean editor. On the top bar you probably have a button with "Pin the current editor" tooltip. You can pin editors so they wouldn't be closed if you reach the limit of the opened editors (General->Editors->Number of opened editors before closing).
    – tomrozb
    Commented Apr 8, 2013 at 18:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.