If you're as lazy as I am, you don't want to go moving your hand every time you need a menu in Eclipse. Is there any way to navigate menus in Eclipse without moving your hands to the mouse or the arrow keys?
I've searched for key bindings for menu navigation (replacing Up/Down/Left/Right), but came up empty.
UPDATE
To clarify, I am familiar with a lot of the features mentioned in the answers, such as "Show Key Assist", and "Quick Access". I've found that the only time I'm ever really moving my hands is to navigate through a list of items, such as the Package Explorer or the Open Resource dialog. I haven't found any alternatives to the arrow keys for these actions.
I like to bind "Show Key Assist", and "Quick Access" to convenient keys, in order to get a list of all menus/commands/views accessible from the context I am currently in.
This isn't really a replacement from ALT+arrows, but it can help reduce the menu exploration you need to do in order to find the right action to launch.
As #VonC mentioned, I'd use Quick Access (CTRL+3) for most commands that don't already have a keyboard shortcut.
You can also use mnemonics to access most menu items. i.e. ALT+F P for print, or ALT+R N for the Run Configurations dialog.
F10 will open the left most menu on most OSes. CTRL+F10 will open the view menu from within a view, and the ruler menu in a text editor. SHIFT+F10 will open a context menu in almost all locations.
PW
If you want to navigate between views of eclipse, you can use Ctrl+F7 & then up/down arrow keys to select the one. For 'Open Resource Dialog', you can use Ctrl+Shift+R.
Related
Eclipse has this great feature of searching text in Workspace(Ctrl+Alt+G), Project, File or Working Set.
The results are displayed neatly in a Search tab/view and when I double-click (i.e. mouse) a particular line, the file (in which that searched text is found) is open exactly at where the search text is.
Is there a keyboard shortcut for that double-click? To open the next one?
There is not one keyboard shortcut to perform this action that I know of, but there are two of them that could work in sequence.
Go to Window > Prefs > Keys
Search for "Show view search"
Set some custom keyboard shortcut because the default one is too long to be efficient (I like to use Alt+Shift+S)
Perform your search
With the search view in focus double-click the first result
When you are ready to go to next item, use a keyboard shortcut to show search view again (Alt+Shift+S for me)
Then press 'Ctrl+.'
This shortcut will display the next result and open a new file is needed.
So with this sequence you can use two keyboard shortcuts (Alt+Shift+S then Ctrl+.) to do what you want.
Checkout the Eclipse Keyboard Shortcuts PDF list for v2.1, v3.0, and v3.1 HERE
#gamerson has the right answer, but for the future I wanted to make sure you are aware of two key meta keyboard shortcuts:
Ctrl-Shift-L (Command-Shift-L on Mac) - Opens up a searchable list of available shortcuts.
Ctrl-3 (Command-3 on Mac) - Quick Access gives you a searchable, prioritized list of a bunch of stuff - commands, menu items, windows, tabs, etc. It's pretty darn useful.
I'm trying to hide Eclipse menu bar to save some screen real estate. I found I can do this using perspectives but that would permanently take out the menu from that perspective. The behavior that I want to get is something along of auto-hide, so that the menu remains hidden until I hit ALT+F for example or any other ALT key combo.
Is there's a setting or a plugin that can do this?
Thanks!
This is just a work around. Create two perspectives.
First one named - With Menu.
Second one named - Without Menu.
In the "Without Menu" perspective remove all menu items and Save.
To create the effect of hiding and showing, switch between perspectives by using
Ctrl+F8.
Theres a fast view option- just right click the tab and select Fast View. It'll bring the entire window down to the eclipse taskbar. You can recover the window by just clicking on it's icon.
Source: https://bugs.eclipse.org/bugs/show_bug.cgi?id=56119
Have a look here Is there a Macro Recorder for Eclipse? You could set up the macro so respond to ALT+F possibly.
For searching a document, I like using the floating Find/Replace window that pops up. Lately, however, hitting command-F pulls up this Find/Replace bar at the bottom of the editor window. I suppose I wouldn't mind it so much, except instead of selecting the text to search it puts the insertion point after whatever I've searched for before. Very annoying. Clicking on the magnifying glass pops up the other Find/Replace dialog.
How can I get the normal dialog to pop-up by default?
I should add that for some reason search is no longer working in Preferences, so I can no longer just search for "Find" to locate the setting I might need to change. So you'll have to give me the exact location.
A little more experimenting reveals that this is PyDev-specific behavior but I still can't find the setting that needs changing.
type Ctrl-Shift-L twice brings up Preferences window.
In Preferences window: type 'find bar' in the search field. This finds 'Find bar' in category 'Aptana Studio' (assuming you have Aptana Studio included in Eclipse). Click this entry 'Find Bar' to bring up the 'Find Bar' settings page.
On the Find Bar settings page uncheck 'Use custom find bar on Aptana editors' See shot.
This did the trick for me!
I added a feature request to the Pydev tracker for a setting to suppress the find bar: https://sourceforge.net/tracker/?func=detail&aid=3097964&group_id=85796&atid=577332
Could you make sure the 'command-f' is binding with menu item 'edit' - 'find/replace...'?
Might other plug-in hook the key binding.
And another way is using 'spy' to see which one contribute it. Focus on the search widget, then click 'alt - shift - f1'.
Here are the ways the Eclipse documentation states you can navigate the Content Assist list:
You can use the mouse or the keyboard
(Up Arrow, Down Arrow, Page Up, Page
Down, Home, End, Enter) to navigate
and select lines in the list.
But all of the options require you to move your hands significantly away from their natural place on the keyboard!
Are there any other, quicker ways I can navigate this list? Something like tab, or the j/k from vi?
This is a great feature, and you can implement it like so: bind movement keys in Eclipse's key binder and then use them in the content assist menu!
Preferences/General/Keys
Line Down: Bind to Ctrl+K
Line up: Bind to Ctrl+I
(both when 'Editing Java Source')
and then try moving with Ctrl-K/I when the content assist pops up!
In Kepler, as jed mentions in the comments, select "when editing text" instead and it should work.
If you try to fill in the content manually, Eclipse will move.
The search is quite advanced, e.g. "ArL" can match ArrayList, etc., so if you know what you are looking for, instead of navigation you could use search.
This is certainly not a solution for everyone, but if you switch to the Emacs keyboard layout you can just use the key bindings for the "previous line" and "next line" commands, e.g., Ctrl-P and Ctrl-N.
Suppose I make a method signature change that breaks several callers, and I want to review the call sites manually to update them.
Once I change the signature, my "Problems" view shows, say, a dozen errors.
What keys can I hit to navigate through them while leaving the keyboard focus in the editor for fast fixups?
(It's been a while, but I think the Visual Studio equivalent is F8.)
Note that this question does not duplicate Eclipse: How to go to a error using only the keyboard (keyboard-shortcut)?, as that one seeks to navigate only between markers in the current file. In this case, I want to go to the next error regardless of which file it's in.
("Marker" is the general Eclipse term for errors, warnings, etc.)
The best I've come up with so far is Ctrl + F7 to flip to the Problems view, then ↓ to pick the topmost error, then Enter to go to it (which returns focus to the editor).
Here's a way to move to the next error, regardless of editor, in one keystroke. It's not perfect, but it works until it's fixed in Eclipse.
Open a "Markers" view. Click the down arrow at the top right, and choose "Configure Contents". Uncheck the show all box, and create the view to show only the problems you want to see. You'll probably want to deselect "warnings" and "errors" as well. Save it.
Click the same "Markers" down arrow, and choose "Group By". Select "None". This is important because you don't want the parent tree level nodes to show, otherwise some of your "next" actions will take you to those, which don't represent an error.
In Eclipse -> preferences -> keys, search for "Markers". If there is not a keystroke bound to the Markers view, create one. I use Ctrl + Shift + M
Get a keyboard hotkey tool like AutoHotKey (for PC's) or iKey for the Mac. I'm using iKey, but there are plenty of other Mac tools you can use. In your hotkey tool, define an action for the keystroke you want to use for "next error". I chose the standard CMD + .
For that keystroke/action in your hotkey tool, generate 3 keystrokes in the following order:
Ctrl + Shift + M
Down arrow
Enter
Of course, you'll want to change the first one to whatever you picked for yours. You'll probably want to restrict that action to be executed only when Eclipse is the current application.
Save that, create some compile errors, and test it.
Try Ctrl + 3 for Quick access popup window.
If the "Markers view" is not already visible, then type in "markers", in the searchbox on the popup window. Once you have selected it, it should stay available, when you press Ctrl + 3 the next time around.
I just had the same problem, after refactoring some parts of code. I had a lot of errors in different files and i had to go through all of those.
I used the following solution:
Mark all (relevant) entries in the Problems view.
To do this switch to the Problems view using Ctrl+F7 and select the entries with Shift+↓/↑
You can also select all entries using Ctrl+A
Open the marked errors by pressing ↵.
Every file containing at least one marked error will be opened.
The cursor will automatically select one error/file, as if you open only this specific entry
Fix the errors in the opened file.
Here you can use Ctrl+. to navigate to next error inside this file
Close the file using Ctrl+W when your done.
Eclipse will automatically focus the next file and you can go back to step 3
In my case this solution was much faster then switching to the Problems view each time.
There's an Eclipse bug entered for this that has an attachment that looks like it does what you want.
You could use AutoHotkey:
save the mouse position, send a mouse event to click on the arrow in CDT console and then return the mouse back to it's original location. Record the mouse coords with window spy or use autohotkey's search by image function (first capture the images of two arrows with printscreen into bitmaps).