Monday, December 27, 2010

Binding Ctrl-Tab in Eclipse

When I am working in a multi-tab environment my fingers expect to be able to navigate through the tabs with CTRL-TAB and CTRL-SHIFT-TAB. In Eclipse this means I would expect to be able to use CTRL-TAB to switch between the files I am editing. However, by default it is set to CTRL-F6.

How To Fix It
The hot-keys are specified under the menu: Window > Preferences > General > Keys
First you need to unbind the commands "Next Tab" and "Previous Tab" by choosing that command and clicking the "Unbind Command" button.

Next bind the commands "Next Editor" and "Previous Editor" by choosing that command and pressing the keys CTRL-TAB or CTRL-SHIFT-TAB where it says Binding.

3 comments:

rosy said...

I actually enjoyed reading through this posting.Many thanks.

Function Point Estimation Training

Travitron said...

This works, except that it's really only taking into consideration "recent tabs". I.e., Ctrl+Tab will not always simply go to the next tab.

Do you know of a way to set it up that way?

Michael Haddox-Schatz said...

Travitron, I'm sorry to say that I don't. I want to be able to go to my recent tabs rather than what Eclipse happens to put to the left and right of my current tab, so this solves my problem. However, since Eclipse puts the tabs this way, I'd imagine that it has a way to move left and right through the tabs it displays.