What are the shortcut keys to change to the next and previous tab in Eclipse on Mac OS X? - eclipse

I want to be able to switch from one file to another in the Eclipse editor (in the Java perspective) from the keyboard (and bind those key combinations to buttons on my mouse). What are the shortcut keys for switching the current tab to the next or previous?

Mac OS X:
Fn+Cntrl+↑
Fn+Cntrl+↓
Effectively Cntrl+page up/page down as given in the first comment for #wibbe01's answer.

According to this thread, switching editors are:
Shift+Command+F6
Command+F6
, which you can remap to:
Shift+Command+Tab
Command+Tab
Note, as mentioned in that same thread:
Command+E lists all the opened editors, allowing to quickly select one
Shift+Command+L lists all the active key bindings.
The bug 86248 helped introduced the Cntrl+↑ and Cntrl+↓, which Bjorn Tipling reports working on Mac with a Fn in front of it.

If I were you I would just go to the eclipse menu, then preferences. Under the general section of the tree there is a section called "Keys" In there you will find things for "Next Editor" or whatever other keyboard shortcuts you are looking for. Map them to what makes sense to you....then you're happy like this :) or maybe even like this :D.
Enjoy.

In Eclipse's preference panel, go to Keys. The command is called Next Tab and Previous Tab, just map these to whatever you want. In my case since I normally use mvim are:
⌘+⇧+[
⌘+⇧+]

You can change all shortcut keys in preferences by pressing ctrl+shift+L 2 times . Switching tab in Eclipse (ctrl+F6) is not easy to press. So you can make it ctrl+tab or whatever you want.

Since I have my F keys mapped to the default setting, I had to use fn-command-F8
I figured it out by first confirming command-F8 was indeed mapped under command-shift-L

Related

Eclipse - Run/Debug shortcut key doesn't work

In Eclipse I can only run/debug my project by using one of the menu buttons. Pressing F11 or Ctrl + F11 does nothing. I've mapped Debug Last Launched to all kinds of various keyboard shortcuts to see if another program running in the background was intercepting the key presses and that doesn't seem to be the case. Every other keyboard shortcut seems to work fine such as Ctrl + Shift + T or Ctrl + G.
Any help? The shortcut key works on my other computer and I keep instinctively trying to press it and it's drastically slowing down my work efficiency.
The only solution works for me ;
Open Key mappings (CTRL+SHIFT+L twice)
Find the debugging shorcuts (F5,F6,F7...) and select
then change the When action value from "Debugging" to "In Window"
Go to Window -> Preferences -> General -> Keys
For each key that doesn't work: Set your binding to whatever you want. - I just copy the command then change "When" from "Debugging" to "Editing Java Source".
good luck.
I battled with a new Dell laptop, so in case it saves someone time ....
By default, the F-key priority was set for sound, brightness and music, e.g. F9 brings up Windows search.
--> This is without pressing the Fn key and the desired Fkey as expected.
To toggle the priority, look for Fn + Esc.
That allows F5, F6 etc to work as expected.
You can press Fn + F6 for skipping music tracks
If your computer has a fn lock/toggle that switches between fn and the f1-f12 keys, make sure that you didn't toggle the other mode by accident.
If you use the default key mappings, restoring defaults might work.
Window | Preferences | General | Keys (or Ctrl+Shift+L then L), then hit Restore Defaults and OK.
For custom mappings, I recommend this answer.
Try F11.
It worked for me. Im using Eclipse in ADT.
Please check if another program is trying to hook keyboard messages. Maybe that program prevents the Eclipse to receive some keystrokes including Ctrl + F11.
I had this problem and finally I found out that the problem is about my dictionary application which used Ctrl + F11 to popup. After disabling the hotkey in the dictionary application, Eclipse started to handle Ctrl + F11 correctly!
Edit: My post doesn't directly react the original malfunctioning-F11-behavoir question. But the issue I had seems quite similar and definitely it relates to some other (quite highly voted) answers.
I've bumped into a similar issue too when I upgraded to Eclipse 4.7 Oxygen and needed to install several plugins from a scratch. F* keys didn't work in the debug perspective even though the appropriate key bindings were configured correctly.
Unfortunately, neither reseting perspective nor reseting key bindings (as suggested in some comments here) helped.
The trick that fixed that for me was:
Preferences > Run/Debug > Perspectives > Restore Defaults
That revived the F* keys functionality in my debug perspective. I don't thing this is the universal way how to bring the behaviour back, but among the other "Resets to defaults" this one may be the right one in some cases, so it's worth trying.

How Do I Switch Between Multiple Eclipse Windows (in "Split Screen" Mode)

Eclipse allows you to open more than one text editing "window" at a time to get a "split screen" effect. This is great, but the problem I'm having is that there doesn't seem to be any way to switch between these windows, directly.
Now, you can use the usual commands (Ctrl+Page Down, CTRL+e, ALT+RIGHT, etc.) to switch between specific buffers. In other words, if I have window 1 with A.java and B.java open, and window 2 with C.java open, I can use Ctrl+Page Down to go from A, to B, to C. However, I can't just go from A or B (ie. from window 1) in to C (ie. to window 2), unless I use CTRL+e and type in "C.java".
There are half a million Eclipse commands though, and they're certainly not all labeled consistently, so it's quite possible I'm just failing to find the relevant command. Does anyone out there in SO-land happen to know it?
By default, its Ctrl+F6. However, its useful if you map you keys to Ctrl+Tab to switch between open editors like Windows.
You can change your preferred keys in Window>Preferences>General>Keys and change "Next Editor" to any key of your choice(Ex: Ctrl+Tab). Hope this is what you needed.
This can be achieved easily if you are using Vrapper in Eclipse. Vrapper
is a Vim plugin for Eclipse. If you are trying to maximize your productivity in Eclipse like we all are, it's well worth the try.
Once you got it installed, check out the Split Editor Plugin for Vrapper. You can then create splits on the fly and switch between them using the standard Vim shortcut: Ctrl-w w
Bonus: don't forget to maxmize your editors using Ctrl-m. If your editor ever loses focus for some reason, regain it by pressing Ctrl-F12
Finally open any file in your project using Ctrl-Shift-r
Edit from anula comment:
A useful thing to mention here: Ctrl-w by default binds to closing window, so if you want to use it as in Vim you need to first go to Window->Preferences->General->Keys and unbind "Close".
You can install the HandySplit plugin from Eclipse Marketplace and bind its 'Toggle focus between split editors' command to any keyboard shortcut you like.

Ctrl Space Not Working in Eclipse Helios on Win 7

I have shifted by Dev Env recently to Eclipse Helios on Windows 7. After that the Ctrl + Space Content Assist feature is not working. I found out that that key option is utilized by Language Settings. I have tried disabling it. But it still doesn't work in Eclipse.
Any help is much appreciated.
Configure Eclipse’s content assist, go “Preferences>Java>Editor>Content Assist>Advanced“. Make sure “Other Java Proposals” is ticked.
http://www.mkyong.com/java/content-assist-ctrl-space-is-not-working-eclipse/
In my case nothing happens after pressing Ctrl+Space. Right now I have set a different short cut for the same and solved
Check your "Keys" preferences: maybe the Content Assist" shortcut has been overridden by another command which would also use Ctrl+Space.
That could happen with the installation of a new plugin, coming with its own set of commands and shortcuts: the bug 303894 for the XText plugin is a good example.
You probably have another application (in systray) that uses Ctrl+Space for something else. In my case I have a small utility which when I press Ctrl+Space makes the active window on top.
The solution for you would be to (1) exit that application which overrides the keys or (2) in Eclipse change Ctrl+Space to some other set of keys.
This was solution for me to get rid of windows key shortcuts:
Go to Start > Type in regedit and start it
Navigate to HKEY_CURRENT_USER/Control Panel/Input Method/Hot Keys
Select the key named: 00000070 for the Chinese (Traditional) IME -
Ime/NonIme Toggle hotkey 00000010 for the Chinese (Simplified) IME -
Ime/NonIme Toggle hotkey
In the right sub-window, there are three subkeys. Key Modifiers
designate Alt/Ctrl/Shift/etc and is set to Ctrl (02c00000). Virtual
Key designates the finishing key and is set to Space (20000000).
Change the first byte in Key Modifiers from 02 to 00
Change the first byte in Virtual Key from 20 to FF
Log off and log back on. I don't think it's necessary to restart.
Do not change the Hot keys for input languages in Control Panel,
unless you want to do this all over again.
https://superuser.com/questions/327479/ctrl-space-always-toggles-chinese-ime-windows-7
I have seen a similar problem in Eclipse Juno (version 4.2.0).
Since you have already tried Eclipse/Java code completion not working, I would check to see if there are any key conflicts. Go to Window -> Preference -> General -> Keys. In the filter box, replace the light gray "type filter text" with the word "Content"; the first item should be "Content Assist." Select it. It should have nothing in the Conflicts box in the lower right-hand portion of the screen.
If you have no conflicts, then it is likely that there is another program, outside of Eclipse, that is binding to Ctrl + Space.
I worked around this with an ugly solution. I copied the Content Assist. In the Binding field, I entered held down the Ctrl + Alt keys and pressed space. This restored the Content Assist function, but it required a brain remap when I am using one machine.
!Screenshot of Eclipse Juno, I had the same problem, then I changed it to different key combination, then it works.1
This is what solved my problem.
Goto Control Panel -> Clock, Language and Region -> Change keyboards or other input methods -> Change keyboards... -> Advanced Key Settings. For some reason I had ctrl + space set as Key sequence for language hot keys. I changed them to something else and rebooted.
Make sure to reboot because it did not work for me without the reboot.
On my Ubuntu, Xfce, ctrl space was allocated to switch language on the iBus preferences (if you have this running, you will see the 'i' icon on the task bar, right click and choose preferences). To change this, bring up the IBus Preferences, on the General tab, see the "Enable or disable:" option, click the ellipses and provide a different keyboard assignment.
This sorted me out without need to restart Eclipse.
I use eclipse indigo and had this problem. Creating a new workspace did not worked.
Go to Windows->preference->General->Keys->"Restore Default" - This fixed my issue
Note that I just had English(US) on windows 7 [Control Panel-> Clock,Language and Region ->Change keyboard or other input methods-> Keyboards and Languages->change Keyboards...->General ==>Default language is English and Installed Services I just had English(US) alone
After doing this some you might need to restart the system if it does not fix.
This is how I fixed my problem on Ubuntu 12.04 regardless of the eclipse version. My problem was that the ibus was overriding the shortcut so I deleted this shortcut configuration.
Type ibus in the dash:
Then select Keyboard Input Methods. From there click on the first three dots next to the Enable or disable textfield. This windows should appear:
If there is something bound to Ctrl + Space simply delete it.
#Polac - Thx. That's what fixed it for me. I'd hit ctrl+space and I'd get a popup for chinese character selection. I have Windows 7 so for me it was:
Control Panel -> Region and Language -> Keyboards and Languages tab -> Change keyboards... button -> Advanced Key Settings tab
Be warned, its stubborn. I tried to just clear them, but as soon as I applied the settings they reset back to using the original key bindings. If I change the key binding to something obscure they still reset sometimes. It's annoying. Maybe its just my OS installation that's goofed, but it could be a Microsoft bug.
Didn't need Chinese on my system, so I removed it as an installed language in the first tab and that finally got rid of the hardcoded Chinese key bindings.
In Eclipse you can use the Alt-/ character sequense instead of Control-Space. This is an old problem which Eclipse and Chinese keyboards, which they addressed by adding this short cut.
I found the answer.
Windows / UV Elements - was OFF! I don't know how but they were off. And when you click Ctrl+Space he working, but your all elements are off and you think that it is not working. You must on all UV elements and after your Ctrl + Space will be work.

Eclipse Keyboard shortcuts in Mac OSX

I'm running Leopard and do all my Java development in eclipse. Some of the shortcuts work such as Command-1 which will do a quick suggest. However how do I get the Function Keys (F5 for refresh in the package explorer) to work? Right now it brings up spaces or whatever System Preferences maps to that.
What about Control-click into a breakpoint when I'm debugging and want to go directly to the chosen function? Is there a way for my eclipse keyboard shortcuts to take precedence over other programs?
i'm running eclipse 3.4 though I've had this problem since eclipse 3.2.
Its been a while since I used eclipse on the mac but I think you have to go to Preferences.app and check the "keyboard" pane. There should be an option that chooses if its Fn-function-key or just function-key for the key press. After that, it would be Fn+F5 for expose and just F5 for F5. You will lose the ability to dim the screen and adjust the sound from the keyboard.
In system preferences under keyboard there is a toggle to turn the f keys into real function keys
Are you using a macbook? In OO.org at least, you have to press fn-fx to get at the application short-cut, otherwise you get the system-wide one.
This doesn't sound like an Eclipse problem.
Are you using an External Keyboard or a macbook ?
If you want to use the debuggers and stuff, you need to change the interpretation of the function keys. You have to manually hit the FN key on your laptop keyboard. Some external keyboards have a function lock.
What about the control click and going directly to the function? That works on the windows version of eclipse, but I can't seem to get it working in Mac OSX.
Tried:
command click = nothing
option click = nothing
control click = opens context menu (like clicking the right mouse button)
You can change system level default behaviour from preferences as #sorin explained. A correction to the claim in the last sentence,
"You can use Fn-function-key to dim the screen and adjust the sound from the keyboard."
for making function keys work for external keyboards by default (and not having to push the extra fn key):
Change the default function key behavior
Choose Apple menu  > System Preferences.
Click Keyboard.
Select "Use F1, F2, etc. keys as standard function keys on external keyboards".

Anything similar to Emacs' buffer/window support for Eclipse?

I'm trying to make the switch from Emacs to Eclipse. One thing that seems to be missing is its buffer/window support.
I know in Eclipse I can drag an editor's tab title over to split the view, creating the equivalent of a new Emacs window, which is a step in the right direction.
I can't find any key bindings for this functionality, though. Ideally, I'd like to be able to set keys to split horizontal, split vertical, switch to next (there is a next editor, but I want the next window/whatever you call it), switch to previous, close this window split (not this editor), close all other editor window splits.
As it is, the only way I've found to close a split pane is to drag all the files over one by one until none are left. Things like this make working with split screens tedious in Eclipse.
Any help would be appreciated, hopefully there's something simple I'm missing.
Emacs+ has this exact behavior for Eclipse: http://www.mulgasoft.com/emacsplus
According to the keys preference there is an unbound command to open a new editor, which would open another tab rather than split the view. There is also an unbound command to close all other editors. Ctrl+W will close the current editor and Ctrl+F6 will switch between tabs. You can bind or rebind these to be closer to their Emacs equivalents. Alternatively there is an Emacs key map which you may find more helpful. Unfortunately I don't it's possible to split the view from the keyboard.
Try Ctrl-Tab and Ctrl-Shift-Tab for cycling through tabs (buffers) and Ctrl-F4 for closing a tab. You can also look through the shortcut bindings in the eclipse configuration.