In IntelliJ, when your cursor is inside a method, you can press Ctrl+P to view the parameters of the method.
What's the equivalent shortcut in Eclipse?
According to this command list, it's possible to show the list of parameter types for a method using Ctrl+Shift+SPace. Also, you can use the Ctrl+Shift+L shortcut to show a list of all shortcuts in Eclipse.
You can use Ctrl + Shift + Space to view the parameters of methods in eclipse
Ctrl + Shift + Space should work, Ctrl + P tries to print actually...
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 want to search for a list of references on one method or class in IntelliJ. Is there any shortcut like Ctrl + Shift + G in Eclipse?
I would say that Ctrl+Alt+F7 is my favorite key combination for finding usages as it gives you a nice popup with good interaction.
Otherwise you can use Alt+F7 that will show you the same information in a tool window at the bottom that will stay there.
Look at the the Default Keymap Reference in the Help menu for all the built-in shortcuts:
for searching name of methods in whole project use:
Ctrl+Shift+F
for searching classes (Files)
Shift+F6
Ctrl + F7 Find usages in file that is, to find all places where a particular class, method or variable is used in the whole project in intellij IDEA
In vim, pressing * in command mode performs an automatic search of the word under the cursor. How can I obtain the same in Eclipse?
A combination of two keystrokes:
First, hit Ctrl + Shift + Right Arrow to invoke "Select Enclosing Element". This will select the word under your cursor.
Use Ctrl + K (Cmd + K on OS X) to "find next".
It appears it was not possible in 2004, and it's still not possible, apparently. I'm speechless...
I also need this functionality and created a small plug-in which adds commands for doing this. You can download it and find more details here: http://eclipselabs.org/p/eclipse-tweaks/
Windows 10, tested on Eclipse 2020-03:
Two Steps:
1. Alt + Shift + Up Arrow, to select the word under the cursor
2. Ctrl + K to find the selected word forward
(Ctrl + Shift + K to find the selected word backward)
NOTE:
If you are inside an XML tag, Alt + Shift + Up Arrow will select from the beginning of the tag to the end tag, including all enclosing elements. Try it!
BONUS:
Ctrl + Shift + Down/Up arrows to navigate methods, as sometimes the selected word is a method you want to go to.
Better still,
Ctrl + O - Go to a specific method, by searching (Just enter the first few letters of the method, and Enter)
Cheers
Press Ctrl + k on a Windows machine. On a Mac, Cmd + k should work (seen here).
Not exactly the same, but maybe helpfull if you work with java. In a .java file you can press
CTRL + SHIFT + u
to find occurences in the same source file.
You can also use Shift + Ctrl + K to search next backwards.
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
It's so easy to select a block of code and tab out, but how about the reverse?
Currently, I just search and replace for white space at the beginning of the line. Is there anything faster?
In Visual Studio and most other half decent IDEs you can simply do SHIFT+TAB. It does the opposite of just TAB.
I would think and hope that the IDEs you mention support this as well.
Shift-tab outdents again :)
The standard shortcut keys are covered in Standard Accelerators.
You'll find many of the more esoteric ones on FAQ What editor keyboard shortcuts are available?.
Here is a general answer for untab:
In Python IDLE: Ctrl + [
In Eclipse: Shift + Tab
In Visual Studio: Shift + Tab
In general, Shift + Tab works for any environment.
This workaround works most of the time. It uses Eclipse's 'smart insert' features instead:
Control + X to erase the selected block of text, and keep it for pasting.
Control + Shift + Enter, to open a new line for editing above the one you are at.
You might want to adjust the tabbing position at this point. This is where tabbing will start, unless you are at the beginning of the line.
Control + V to paste back the buffer.
I hope this helps until Shift + TAB is implemented in Eclipse.
Shift + Tab does that in Flex Builder (based on Eclipse), so it hopefully should work in regular Eclipse :)
In PyCharm, just use Shift + Tab to move a block of code left.
You can do this by going to the Window menu → Preferences, and then open the General list. Choose Keys.
Scroll down the list of keys until you see "Shift Left". Click that. Below that, you'll see some boxes, one of which lets you bind a key. It won't accept Shift + Tab, so I bound it to Shift + `. Apply Apply and Close, and you're all set.
Yes, in PyCharm: Shift + Tab works fine.
You can also change the shortcut. Use the Command + K, Command + S shortcuts to open the Keyboard Shortcut menu. Search for the "tab" and find the "outdent" in the list.