Mac OS tab switching in Eclipse-based IDEs - eclipse

When I'm in Mac OS X, I'm able to switch tabs in my browsers and in TextMate using a Command- keybinding. If I want to go to the first tab, I use Command-1, second tab Command-2, etc.
Is there a key binding in Eclipse based IDEs that will support this same functionality?

While using eclipse on OSX, for switching tabs use the following shortcut
Ctrl + fn + Up Cursor Key for moving towards left tab
Ctrl + fn + Down Cursor Key for moving towards right tab
Here Ctrl is not Command, it is Ctrl just like other OS.

Eclipse doesn't support a tab-index-based navigation. The default editor switch key binding as noted by other responders is CTRL+F6. You can configure this to your liking (Window > Preferences > Keys: Next Editor).
Another way to switch between editors is to use CTRL+E. This presents a dialog with all open editors. You can type in the name of the one in which you are interested. This comes in handy when you have numerous open editor tabs (and Eclipse has hidden tabs it is unable to show).

As far as know the only way to switch between tabs in eclipse is CTRL+F6 and CTRL/PAGEUP, CTRL/PAGEDOWN .
In OsX CTRL become CMD .

If you want to support the OSX based approach for a TabFolder, you will have to implement this yourself. E.g via an installed KeyListener on the tab folder.
If you want to implement this for the editors in the editor area of an Eclipse based IDE, you can do it via a new command with bindings for M1+1 to M1+9... but... please note that M1+1 is usually bound to "quick fix", M1+2 is bound to "quick assist", M1+3 is bound to "quick access", etc... So you will have a conflict...

Related

Adding Alt + Space shortcut in Eclipse

I am using win7 and eclipse with Aptana plugin for trying some examples on Ruby. But I can't figure out how to add Alt + Space as a shortcut in Eclipse (I want to add it to complete already defined variables). The issue is that when I try to add that combination (Eclipse reads the keys clicked) and the menu window appears in the top left -> it is shown when you hit the Alt key.
Does anyone has a hint how to add the shortcut?
I found similar post, but don't know how and where to add the code there.
Autohotkey, remap Left Alt + Space to Control + Escape
In Eclipse, the code-completion shortcut is Ctrl+Space (it's called Content Assist in Eclipse lingo). Is that what you're looking for?
I'm pretty sure it can be mapped to a different keyboard combination. Open Preferences and navigate to General > Keys and then search for the Content Assist command to re-map.

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.

Is there a shortcut for switching between panels in eclipse?

Eclipse has an MDI structure (Multi Document Interface), so the search panel, the package explorer and the code editor can all be open in one window, but I haven't found a keyboard shortcut for switching between these panels. For example, after I search the code-base, I would love to have a quick shortcut for going back to the code editor.
If I understand your question correct, you are probably looking for Ctrl + F7 and Ctrl + Shift + F7. Other navigational shortcuts can be found in the menu: Window > Navigation.
Not an universal shortcut for going to any panel, but:
Ctrl+Shift+E
allows you to go back to any Editor (although it's still a little heavyweight for quick editor navigation).
And if you want to switch between perspectives its: Crtl + F8 and Ctrl + Shift + F8. You can go to Help > Key Assist... for a full list of shortcuts (this list will change depending on the active editor etc.).
There are two ways to do it.
One is how #VonC did it, in an earlier reply; using CTRL+SHIFT+E which opens a box containing all the panes with their paths.
The other one is to simply use CTRL+E, which will open a pop-up just over your cursor containing the list of panes open. Parse using arrows and ENTER

How do i use eclipse efficiently by making maximum use of keyboard

I mean to say which and all shortcuts from key board is available while working on eclipse?
like how Ctrl+F11 is for run project like that.
Effective Eclipse: Shortcut keys
Useful Eclipse Shortcut Keys
10 Eclipse Navigation Shortcuts Every Java Programmer Should Know
You can define your own:
FAQ How do I provide a keyboard shortcut for my action?
Provider by MatrixFrog in comments below:
Hidden features of Eclipse
Press ctrl + shift + l it will open shortcut key menu.
Note:-
Beside this also some other short cut will available. If you tell us functionality you wanna access we can tell you the short cut for it.

what's the keyboard shortcut to toggle breakpoint in pydev using eclipse

I think I'm missing the elephant in the room but for the life of me I can't find the keyboard shortcut to setting a breakpoint in eclipse when using the pydev plugin.
Things that I've already tried:
Ctrl + Shift + B: does nothing.
Ctrl + F10: brings up the breakpoint context menu where you can select to add breakpoint, remove etc... I don't want to have to scroll through a menu every time I want to use a keyboard shortcut.. .kinda defeats the purpose of a shortcut.
Clicking on the strip on the left hand side of the code: this is the only way that I'm setting it atm, but I'm rather avoid using the mouse if I can.
I'm using pydev 1.6.1 on eclipse 3.6
EDIT (31/08): In light of the two answers by codedevour and Tao, I've tried editing the shortcut but have had no luck with the new shortcut Ctrl + Shift + Alt + B either. Other shortcuts work. I've also tried changing the "When" drop down from In Windows to 'Pydev editor scope' with no effects.
From what the editor is telling me, there is no conflicts with the breakpoint shortcut.
This is a fresh install on two machines, both windows 7 and it's happened on both machines.
Finally found it!
The answer is here:
http://www.mail-archive.com/pydev-users#lists.sourceforge.net/msg04234.html
In short, shortcuts are not set for all perspectives of eclipse.
Whilst in the pydev perspective, go to Window > Customize perspective > Command Groups Availability > Check breakpoints.
That's it!
I was using the pydev perspective (which is what it switches to when you first create a pydev project) however, breakpoint shortcuts are only available in the debug perspective by default so you need to turn the shortcut on... wow that was so NOT obvious!
Ctrl + Shift + B
If this refuses to work, have a look at Window > Preferences > General > Keys and look for overlayed keys which may shadow this shortcut.
Ctrl + Shift + B works for me and I am using pydev 1.6.1 with eclipse 3.6.
Perhaps, you have a conflict with another program? Try change it under menu Window > Preference > General > Keys > Toggle Breakpoint to another keyboard shortcut.
On recent pydev versions:
Go to Window > Perspective > customize perspective...
And in tab "Action Set Availability", check "Breakpoints"