One thing that has always frustrated me with using Eclipse on the Mac is the keyboard mappings that require the Alt or Option key. I'm used to using Eclipse in a Linux environment, and using that key in the mappings isn't an issue. However, on the Mac its purpose is for entering special characters.
Is there any way to switch this so that Eclipse's default key mappings work correctly?
I use commands like Alt + Shift + C, Alt + Shift + T, and a few others quite frequently, and not being able to slows me down. I also would like to use what I'm used to so that switching environments is a little more transparent.
Is this what you're looking for?
To modify just go to "Binding:" and then press the hotkeys
Related
When I try to comment out multiple lines by CTRL+ Shift + /, it started working as Collapse All feature in Eclipse. I restored the defaults setting as recommended in other websites but did not help.
For instance, when I do CTRL+ Shift + L, I can see the Add Block Comment option and when I click it, it works. However, the shortcut shown as CTRL+ Shift + / is not working.
Here is my list of available key bindings using CTRL+ Shift + L:
How can I fix this problem?
Edit: Here is the screenshot of the list of the key bindings in Window > Preferences > Keys:
Second Edit: I use Windows 10 and I downloaded the last version of Eclipse which is 2019-09. I created a new project and a new Java class. The shortcut still works as collapse all.
I realized that CTRL+ Shift + Numpad_Divide is defined as collapse all. For some reason, my computer consider / as Numpad_Divide and does not function as comment out.
Just throwing this for future users:
I had the same issue on my eclipse. I am using windows 10 as well.
Anyway before the commands CTRL+SHIFT+numpad... will work first you need to "enable" this mode by pressing CTRL+numpad_divide. You will notice that next to all functions little minus signs will apear. Once you do that you will be able to use colapse, colapse all, expand, expand all.
Pressing CTRL+numpad_divide again will disable this mode and you won't be able to use those shortcuts.
Most keyboards have two "/" keys, and the problem you experienced will arise if the incorrect "/" key is used when trying to Add Block Comment for selected code:
The "/" key on the number pad is the divide key, and this is the key that must be used with CTRL + Shift + / to Collapse All.
The "/" key to the immediate left of the Shift key is the forward slash key, and this is the key that must be used with CTRL + Shift + / to Add Block Comment for selected code.
You can see the distinction when viewing the Tools > Preferences > General > Keys screen, though it is not obvious at all:
For Collapse All, Eclipse helpfully describes the divide key as "Numpad_Divide" for the binding:
However, for Add Block Comment Eclipse only describes the forward slash key as "/" for the binding:
Eclipse could remove the ambiguity if it described the forward slash key as "Forward_Slash" instead of "/".
Anyone know of a set of hotkeys that can perform a find/replace in eclipse?
Currently the flow looks like:
Select line or lines
Ctrl+F
Type phrase
TAB
Type replacement
And then I have to do the unthinkable and grab my mouse, choose selected lines and then click on replace. It doesn't sound like much, but it seriously disrupts my flow when i'm doing a bunch of word replacement. I wish their was a way to choose "selected lines only" and "replace all" using keystrokes only besides having to hit TAB 12 times. Or maybe i'm using the wrong tool within eclipse for this sort of thing...
Using Ubuntu and Eclipse Luna 4.4.2
Using Find/Replace for refactoring seems like a smell. You should instead use the refactoring operations
Rename : Alt + Shift + R
Extract constant : Alt + Shift + K
Extract method : Alt + Shift + M
Extract variable: Alt + Shift + L
Inline : Alt + Shift + I
Change method signature : Alt + Shift +C
Introduce indirection
Introduce parameter object
and so on, which all do a kind of replacement by themself, but always work on the syntax tree and not on the text. However, the refactoring support depends much on the language used in the project, and while Java has really good support in Eclipse, this might not be the case for other languages.
I had been trying for this for a long time and ended up in multiple pages without help. I figured it out myself after playing around
For the first time, you need to do the below
Ctrl + F - to open the search box on the top right corner of the IDE (as in image)
You might have to drill down (using the small icon on the left of the search box) to see the replace text
This setup stays from now onwards.
Now you can simply use
Ctrl + F, Tab, Alt+Shift+Enter combinations to do the search and replace
I use eclipse 2020-03 on windows. I am pretty sure many of the previous releases had the same functionality on linux as well.
Screenshot of the feature:
I found thath ctrl+K works in my ide (Neon.3 Release (4.6.3) on windows)
First use Ctrl+f to set a term for search, then use ctrl+K to move to next.
If you need to replace something, keep in the clipboard the text and use ctrl+K, ctrl+v.
There's the weirdest things with my new netbook.
I start increment search in Eclipse with ctrl-j, any press on one of the 2 shift keys with a combination of another keys interrupts the search and insert the character, which makes searching words with a combination of lower case/upper characters case very difficult (I can still use CapsLock)
Using Eclipse 3.8.1 under ubuntu 14.04
shift-left+shift-right key combination shortcut for keyboard layout switching was somehow interfering with Eclipse.
Once every few hours this happens - when I press Shift-2 to get a ", and # appears. When I press Shift-' it puts in a " (although this only appears after pushing another key as well). I am on an English (as opposed to American) keyboard. I must be pressing some sort of shortcut key combination, but I don't know what it is. It goes away when I restart Eclipse. I can live with this problem, but I would rather not!
Anyone know what the shortcut I'm accidentally using is, so I can avoid it/correct it in future?
Edit: Windows 7
If you have several language layouts on the computer you are probably switching on them.
What OS are you using?
If Windows 7 the shortcut is ctrl + shift
http://www.tomshardware.com/forum/10444-63-shortcut-keys-keyboard-language-changing
If you're using windows XP i think the shortcut was alt + shift
If you are using Windows, pressing Ctrl + Shift changes keyboard layouts. In your case it seems to Switch to the US layout which has the # on Shift + 2
My coworker keeps insisting that I make the switch from IntelliJ to Eclipse. I'm considering relenting, mainly because the compile/deploy time it takes for my Android project seems to be considerably less in Eclipse than IntelliJ (I imagine Eclipse does some sort of incremental compilation, etc. that IntelliJ can't do for Android).
However, there are a few shortcuts that I feel are essential and I don't want to do without, and I'm wondering if anyone knows of a way to do them in Eclipse (perhaps add via a plugin?):
Ctrl-W (select word, and then expands selection to include statement,
block, method, class... this should work in XML and other types of code as well)
Ctrl-D (duplicate selection, if selection, or otherwise line)
Ctrl-Shift-V, paste from history (pops up a list of recently copied text)
Go to Symbol (searches through all methods, fields, etc in your project)
I'm sure there are a bunch of others I'll really miss, but these are the main ones I use all the time.
about the go to symbol thing
there are the following functionalities available
ctrl + shift + r - open resource
ctrl + shift + t - open type
ctrl + alt + g - find the selected text in workspace
ctrl + shift + g - find references in workplace (as selected by caret)
ctrl + o - quick outline, all methods in class
there is also a plugin calld instaSearch that you can easily install, it offers a complete project active search.
I believe IntelliJ is a much better IDEA, but you asked..
ctrl+w
Alt Shift Up Expand selection to enclosing element
ctrl+d
Ctrl Alt Arrow Duplicate line(s) up or down
ctrl+shift+v
Not that I have seen
ctrl+shift+a
No, and that is a truly amazing feature.