Under Eclipse I can inspect expressions/variables in debug mode with Ctrl+Shift+I. In IntelliJ IDEA (Community Edition), I can add expressions/variables to the watches, but on the next debug they are lost.
Is there any way to inspect variables and expressions on the fly when I'm debugging?
Quick evaluate expression with Ctrl + Alt + F8 (or on a Mac: Cmd + Opt + F8) gives me exactly what I want.
Do you mean "Evaluate expression" action Alt + F8?
Many more useful shortcuts are in Intellij Reference Card.
Ctrl + Alt + F8 will work.
This shortcut may trigger the Intel HD Graphics hotkey for resetting display settings.
Alt + Left Mouse Key will also work.
If you want to view/edit the shortcuts, you can go to Settings (Ctrl + Alt + S) -> Keymap and search for Quick Evaluate Expression
Ctrl + Alt + 8 in case of Intellij Idea 2019.2 and Ubuntu 18.04.
In mac, alt+clicking variables help !
Related
Is there an equivalent of Ctrl + Shift + L (show shortcut references) from Eclipse in IntelliJ IDEA?
I am switching to it from Eclipse but I have to check the keymaps frequently and I would like to have access to the quick reference of shortcuts instead of opening the settings to do it.
Learning shortcuts: I switched from Eclipse, too. Initially I started with the Eclipse key bindings, but then decided to switch completely. I used KeyPromoter for about 2 days, it is annoying but increases the learning curve heavily. Help->Find Action... (Ctrl+Shift+A) helps, too.
Reference card: After that I printed my own shortcut reference. Took one hour, but it was worth the time, because I have adapted some shortcuts and some shortcuts are displayed incorrectly in IntelliJ Idea. Here's a Word template.
Command + Shift + A displays a field that performs a search on an action or option name. Shortcuts along with their corresponding keymap are displayed during the search.
I think Ctrl + Shift + L (show shortcut references) from Eclipse must do "Introduce variable..." In Idea it is Alt + Shift + V or with menu Refactor/Introduce variable...
May be useful to somebody(begginers like me :) ).
The correct answer is Ctrl+Shift+F to search text everywhere in the project.
I usually use "Shift Shift" that it searc everywhere shorcuts included.
So for example if I need to search "Optimize import" I do
Shift Shift and write "import" or "optimize" and it appear.
I currently use a variety of keyboard shortcuts in Eclipse such as:
Ctrl + Shift + R: Open Resources
Ctrl + F6: Switch Files in Editor
Ctrl + Q, ? To switch to desired window
Ctrl + Alt + R: To Restart My server
Ctrl + O: To view an outline of a class
F12: to go to the editor
What are some other productive shortcuts I may not be using?
Shift + Ctr + L
This opens the list of keyboard shortcuts ;-)
My favorite is quick access: Ctrl+3 and start typing anything you are looking for...
Here are my frequently used hot keys and I do think they improve my productivity very much
Alt+/ to use the code templates that are defined in the Windows→Preferences→Java→Editor→Template
Ctrl + Shift + R to find files of any type.
Ctrl + Shift + O to organize imports and import the missing imports automatically
Ctrl + Click on a variables / functions to go to its declaration
Ctrl + T on a method or class shows the whole inheritance tree, for example all methods which implement an interface.
I'm using Eclipse for Python and R development. How can I jump between editor tab and console window using a keyboard shortcut / hotkey?
Go view Console: Shift + Alt + Q + C
You can switch to Editor using Ctrl + F7.
Ctrl + Shift + L displays all the shortcuts in Eclipse.
I've found the following works:
Toggle between views: Ctrl + Shift + F7
Switch Editor: Ctrl + Shift + F6
Go to R Console (In StatET perspective): Ctrl + R, C
However, the first two are not a direct route back to the editor and require use of the arrow keys and Ctrl + 7 does not work for me. Any other ways to go directly back to the last editor used?
For RStudio:
Ctrl+1 : focus to source
Ctrl+2 : focus to console
More shortcuts are mentioned under the 'View' menu.
Is there a list of the default Eclipse keyboard shortcuts? I'm generally looking for language agnostic things like starting the debugger or deleting an entire line in the source editor.
Rather than a full list of shortcut (JGlass mentions for Eclipse 4.6 this pdf), I prefer using only a few shortcuts:
CTRL+Shift+L: "Show Key Assist", List of shortcuts (depending on the context)
CTRL+3: Quick Access
Source: "Good features of Eclipse 3.6 (Eclipse Helios) JDT, 2011, from Sony Thomas"
Those two covers almost everything.
You can add two others:
CTRL+1: Quick Fix
ALT+Shift+F1: Plug-in Spy
Note that Eclipse 2019-09 now shows key bindings when command is invoked.
For presentations, screen casts and learning purposes, it is very helpful to show the corresponding key binding when a command is invoked.
When the command is invoked (via a key binding or menu interaction) the key binding, the command's name and description are shown on the screen.
Key binding of triggered command shown on screen
You can activate this in the Preferences dialog via the Show key binding when command is invoked check box on the General > Keys preference page.
To toggle this setting quickly the command 'Toggle Whether to Show Key Binding' can be used (e.g. via the quick access).
As VonC said you can get alist of short cuts with the following command.
Ctrl + Shift + L "Show Key Assist", List of shortcuts (depending on the context)
SHORTCUTS FOR DEVELOPMENT
But here are some which you will use often during your development.
Ctrl + Shift + P Switch between openning and closing braces.
Ctrl + Shift + R Open any file quickly without browsing for it in the Package Explorer. This shortcut opens a dialog box that accepts the name of the file you’re looking for.
Ctrl + Shift + T Open a type (e.g.: a class, an interface) without clicking through interminable list of packages. If what you want is a Java type, this shortcut will do the trick.
Ctrl + O Go directly to a member (method, variable) of a class file, especially when there are a lot of methods.
Ctrl + Shift + F Format code.
Ctrl + Shift + / Comment out XML or JSP code.
Ctrl + L Go to line number N in the source file.
Ctrl + E Show a list of open editors.
Ctrl + F6 Move between open editors.
Ctrl + 1 Quick Fix.
Ctrl + 3 Quick Access.
Ctrl + Q Go to the last edit location.
Ctrl + T Go to a supertype/subtype.
Ctrl + I Indent selected code block.
Ctrl + + Move to one problem (i.e.: error, warning) to the next (or previous) in a file.
F3 Go to a type declaration.Alternatively, you can hold Ctrl down and click (ie: Ctrl + Click) the hyperlinked variable.
SHORTCUTS FOR VARIABLE GENERATION
Ctrl + 2 + L Generate return value type and variable assignment
Alt + Shift + L Generate return value type and variable assignment. but here you can make selections.
SHORTCUTS FOR DEBUGGING
F8 Resume
CTRL + F8 Resume.
F5 Step Into
F6 Step Over
F7 Step Return
CTRL R Run to Line.
F11 R Debug
CTRL + SHIFT + B Toogle Break Point
You can find further shortcuts under :
Help → Help Contents → Java Development User Guide → Reference → Menus and Actions
Previous answer not quite correct as in Eclipse you can redefine keyword shortcuts (as I often do).
You can always access current list of defined shortcuts by pressing Ctrl + Shift + L in Eclipse (on Windows at least).
The full list of defaults in Eclipse 4.6 and earlier versions can be obtained from this GIT Hub page:
https://github.com/pellaton/eclipse-cheatsheet specifically https://github.com/pellaton/eclipse-cheatsheet/raw/master/eclipse4.6/eclipse-shortcuts-4.6.0.pdf
Hey, question says it all.
I have folding turned on in Eclipse (v3.4), and rather than having to click the little +/- in the page gutter, I'm wondering if there's a keyboard shortcut to just "fold the current method". A quick look at the menus and what-not in eclipse doesn't show a menu item for it, so maybe you just can't do it.
Anyone?
To expand on petrilli's answer:
Ctrl + Numpad_Multiply can also be used to expand all
Ctrl + Shift + Numpad_Divide is bound to collapse all
Ctrl + Numpad_Divide toggles folding on and off
And yes, they can all be rebound, if you know what text to filter on in Windows | Preferences | General | Keys.
"Folding", "Expand", "Collapse" are keywords that should get you all of the relevant commands.
By default they're bound to Ctrl + Numpad_Minus and Ctrl + Numpad_Plus, but you can rebind them.
If you are using eclipse-pydev then the default keybinds are
ctrl + 9 : collapse all one level
ctrl + 0 : expand all one level
ctrl + -_ : collapse current location
ctrl + =+ : expand current