Eclipse Ctrl+Shift+D not working With Pydev - eclipse

When Using Pydev on Eclipse, I wanted to bind Ctrl+Shift+D Copy Lines and Ctrl+D to Delete line. But when I do so, the Ctrl+Shift+D doesn't work.
I removed all the other bindings of Ctrl+Shift+D but it doesn't work.
Fun fact, if I choose Ctrl+Shift+C, it does work, so I'm wondering where is this key binding used.
The problem arrises only in Pydev, ie. when I open the file in Text editor the bindings work.

This was fixed for PyDev 6.3.3.
The problem was that there was a command bound to Ctrl+Shift+D which was not visible there because it wasn't properly categorized.
I fixed this in: https://github.com/fabioz/Pydev/commit/422a0bde1d1a3ac5c091c00e88368a3bc3c0dc5f
Note that you could still override it if at the keybindings dialog you created a command and put the 'When' as 'PyDev editor scope' (which defines when it's active -- it wouldn't work without this because the hidden action had a higher priority given that its scope was narrower).
See details at: https://www.brainwy.com/tracker/PyDev/906

Related

IdeaVim: Make Cmd-A (macOS) select all text in visual mode

I want Cmd-A (the macOS Command key, plus A) to select all text in visual mode, so I can e.g. indent or delete it using vim commands, Just like it does in MacVim. By default, it selects all text, but vim commands don't work on it.
I've put the following in .ideavimrc:
map <D-a> <esc>ggVG
And also removed the default Cmd-A shortcut in Preferences -> Keymap, because it seemed to override the vim one. But now Cmd-A just doesn't do anything.
I've found two workarounds so far, neither very satisfying. For both start out in normal-mode.
ggVG
press v followed by Cmd-A
<D-*> mappings are not supported in IdeaVim yet. Feel free to vote for VIM-758 and contribute a fix to https://github.com/JetBrains/ideavim.
Edit: You can check your effective mappings in IdeaVim via :map.
Edit 2: I've checked <M-*> mappings in IdeaVim 0.50 in macOS. They do exactly what you want, but with <M-*> instead of <D-*>. In my experiment, I've remapped dd to Command-A via:
map <M-a> dd
Important: the first time you open the IDE afterwards, there is a notification: "Using the shortcut from vim emulation. etc." Do not click the link in that notification, otherwise it will not use your shortcut defined in .ideavimrc.

eclipse rcp keybindings don't work

I am trying to make eclipse keybindings work.
I tried to make the rename command work.
I looked at some tutorials and experimented. I enabled command and key binding trace in console (http://eclipsesource.com/blogs/2009/07/08/tip-tracing-keybindings-in-rcp/).
I have created a custom command:
com.mycompany.myproduct.command.rename
This is what I got so far:
1) I tried to follow this tutorial,http://www.vogella.com/tutorials/EclipseCommandsKeybindings/article.html, but I came to the conclusion that this is for e3. This is because you need to add commands plugin that recognize only old e3 handlers. No xmi is involved
2) I tried to use xmi binding contexts. I had my command registered in the top level commands tree and connected to a handler in the top level handlers tree.
In the binding tables section I have a bindingTable that works in Dialog and Windows context. I added a key binding. The sequence is "F2" and it is connected to my custom command.
When I hit F2 I get the following message in trace:
COMMANDS >>> execute >>> starting: id=org.eclipse.ui.edit.rename; event=ExecutionEvent(Command(org.eclipse.ui.edit.rename,Rename,
Rename the selected item,
Category(org.eclipse.ui.category.file,File,null,true),
org.eclipse.ui.internal.MakeHandlersGo#1285594,
,,true),{},Event {type=1 Tree {} time=1480412218 data=null x=0 y=0 width=0 height=0 detail=0},org.eclipse.e4.ui.workbench.modeling.ExpressionContext#177fc1a)
In short the default eclipse IDE rename command is fired (my key binding does nothing), and nothing happens on my application.
However, if I change the sequece to "M1+1" and hit ctrl + 1, a little pop up comes up that lets me choose between "quick fix" (eclipse IDE command) and my rename. If I choose rename the handler fires.
Now, how do I disable eclipse IDE default keybindings. The instructions of the tutorial in step 1 definitely don't do it.
Thanks!
You can try to force E4 to read your key binding as an user one, adding the "type:user" tag to the KeyBinding itself :
I swear sometimes it seems like the application just likes to see us suffer. I had the same issue you had; a while ago my key binding was working just fine and today I notice it doesn't work anymore. Thanks for this post I found 2 solutions:
"type:user" from the above comment
remove org.eclipse.ui from the run configurations; it seems this was added when I pressed add required plugins after adding some plugin myself

Eclipse - multiline comment with asterisks doesn't work

I'm not able to use ani shortcuts for using comments with asterisk. Every key combination doesn't work. I tried with CTRL+/, CTRL+SHIFT+/, CTRL+C; all of these have the same output, i.e. a simple comment with // on every line. Other shortcuts like CTRL+\, CTRL+SHIFT+\ or CTRL+SHIFT+F doesn't work at all.
So, how can I have this shortcut?
These are the Comments options
Open Window>Preferences>General>Keys>type "add block comment" in the search box, you should see:
the type "remove block comment"
These settings are by default, but if the shortcut is not working on your machine, you must be missing these bindings, To create them, you need to mark the command "Add Block Comment", then click inside the "Binding" field and press CTRL+SHIFT+/, then press Apply. The same is for uncommenting.
I have a similar problem to the one you have: the / shortcut seems to trigger a folding operation (at least in the Java editor) that does not appear in the keys preferences table.
Modifying the key in the keys preferences table seems to work fine: setting the binding to Shift+Ctrl+Q for the "Add Block Comment" command sets the expected block comment.
The reason is clear to me: the Shift+Ctrl+/ binding is very difficult to reproduce in a Linux environment because Eclipse makes a clear difference Numpad_Divide and the '/'. The Normal '/' strike is being modified by the shift key (French keyboard).

Hidden keybindings (?)

In the Eclipse Juno I cannot unbind the CTRL+ALT+W, because the binded command (show properties in SVN) is working with this binding, meanwhile there is no any bind to CTRL+ALT+W in the Preferences / General / Keys tab. Moreover, I unbinded all of bindings to W.
The problem is that the ALTGR+W (CTRL+ALT+W) is the '|' (pipe) character in the Hungarian keyboard layout. So, I cannot type '|' in the Eclipse.
Maybe, are there the hidden keybindings somewhere?
I have found the resolve!
All keybindigs stored in [your-workspace]\.metadata\.plugins\org.eclipse.e4.workbench\workbench.xmi, and I found here the CTRL+ALT+W (I don't know why not visible in Preferences). I changed it to any other key, or insert a <tags>deleted</tags> into the bindings tag. (I had exited from Eclipse before did it).
Once restarted the Eclipse the CTRL+ALT+W is freed.
Now the ALTGR+W types the '|'. That was my goal!

Highlight and replace arguments in autocompleted functions in PyDev interpreter

When I hit Ctrl-Alt-Enter in PyDev and begin typing a function name into the interpreter, PyDev helpfully offers a list of autocompletions. When I hit Enter, PyDev completes the function name and adds the parameter names, in parentheses. This would be great, except that the parameter names aren't highlighted, so I have to delete the parameters (or type an octothorpe) before I hit enter.
Is there a way either of making PyDev highlight the parameter names (ideally letting you tab to the next one, as it does in the editor) or of omitting them altogether? Having to manually delete the parameters defeats any efficiency gains from autocompletion.
Unfortunately this cannot be currently configured.
Still, you should be able to apply the completion with Ctrl+Enter (instead of only with Enter). That way the completion is applied without the arguments (nor the parenthesis -- which may not be 100% what you want) -- note that the same can be done in the PyDev editor, not only in the interactive console.
Please add this to the PyDev features tracker.