5
votes

I went into Window->Preferences->General->Keys in Eclipse to map Ctrl+Tab to "Previous Editor". At first it worked just like Visual Studio's Ctrl+Tab..I can switch the last file I was editing. Now, for some reason, Eclipse will not switch to the previous file after I release the Ctrl key. Instead, I have to press Enter after releasing the Ctrl key. It's very annoying.

Does anyone know how I can have Eclipse switch to the previous file by just pressing Ctrl+Tab?

Thanks

5
is the same thing happening when you use Ctrl + e, or Ctrl + page up/down? or just with your custom keybind? - jhurtado
Ctrl+e=yes..Ctrl+pgup/pgdn=no - User1

5 Answers

10
votes

You're looking for this: Eclipse's Visual Studio Ctrl+Tab and Ctrl+Shift+Tab Equivalent.

By pressing Ctrl+F6 you get the behaviour (I think) you're looking for. On Window->Preferences->General->Keys you could switch the key binding to Ctrl+Tab.

5
votes

Go to the .metadata directory in the workspace's folder and open the file org.eclipse.ui.workbench.prefs located in .plugins\org.eclipse.core.runtime\.settings.

You have in it an option named STICKY_CYCLE which must be set to true. Put it to false or simply remove the whole line.

The matching line when exporting the preferences is : /instance/org.eclipse.ui.workbench/STICKY_CYCLE=false

2
votes

Eclipse Juno Window Menu/Preferences/General Uncheck "Keep next/previous editor view and prespectives dialog open

fixed for me

1
votes

I had this problem too, and found a solution.

However, the problem was not due to Eclipse, but due to my Caps Lock key settings. Therefore this solution might not apply to your problem. Given the frustration I went through to fix this, I would still like to share this with you.

I am using Ubuntu 12.10. In the System Settings, under Keyboard Layout, Options..., I had "Caps Lock key behavior" set to "Make Caps Lock an additional Control but keep the Caps_Lock keysym".

When I changed this to "Default" and changed the "Ctrl key position" to "Caps Lock as Ctrl", the problem in Eclipse was solved.

0
votes

Related to @tijs answer, on Xubuntu 20.20 (and possibly other Ubuntu versions), this problem can appear in combination with keyboard layout settings. I solved it as follows:

First, make sure to un-check: Preferences > General > Keep next/previous editor view and prespectives dialog open

Then open system keyboard settings (xfce4-keyboard-settings) Layout > Change layout option

My setting for "Change layout option" was "Both Ctrl together". I changed it to none (-)

Now, the Next/Previous Editor in Eclipse worked correctly with Ctrl+Tab and Ctrl+Shift+Tab, (i.e. not requiring pressing Enter).