How to remove Eclipse user short cut keys? - eclipse

I create a user shortcut key in the Eclipse.
Now I hit the restore defaults option. It wouldn't remove user keys and Still available user keys.
Is there any other way available to remove user keys?

For me, when I hit the Restore Defaults button, all custom key bindings get removed. Also custom copies of bindings (such as Next tab in your screenshot) get removed. I don't understand why that doesn't work for you.
But your can try this:
Select all the copies of Next tab one by one and hit the Unbind Command for binding copies, or button Restore Command for original bindings.

Related

Ctrl+D equivalent in DBeaver

I checked the DBeaver shortcuts docs page and Googled a lot but couldn't find any info on this...
Does DBeaver have a Ctrl+D equivalent (I am referring to Ctrl+D in VS Code, where it multi-selects by adding the current selection)?
Background
I work with BigQuery a lot, and in BigQuery Console and VS Code they both have the Ctrl+D functionality but not in DBeaver (at least not by default with the same hotkey)
DBeaver does not come with this functionality working by default, but you can very easily add this shortcut yourself with the following 4 steps:
On the top context menu, click Window -> Preferences. Then select User Interface -> Keys.
The command you want to add a binding to is the Multi selection down relative to anchor selection. So, on the filter text box, write multi. Select it, then on the bottom pane select the Binding text box, and press the shortcut keys down (In this case, press Ctrl+D).
Make sure that the When column changes to Editing Text. Otherwise, change this yourself. It will look like the iamge below
The Ctrl+D shortcut is already taken by the "Delete Line" command, so you need to unbind them. On the filter textbox, write ctrl+d. Then click on row that shows Delete Line, and click the Unbind Command button.
Click Apply and Close and have fun.
I believe it is Ctrl+Alt+Down (from https://dbeaver.com/docs/wiki/Shortcuts/)

Add hotkeys to Eclipse

I use IBM Rational Developer for i, which is based on Eclipse, to develop applications for IBM i. During development, I constantly use my mouse to send the source code to the IBM i server and start compiling it. To do this, right-click on the project, select Remote Actions and Submit Build in the submenu. This is very exhausting.
Could you configure a hotkey to perform this action?
There are a few strategies for this.
In Preferences and "Keys", you can list key bindings, assign new bindings, and clear existing bindings. It's convenient to sort by the "Binding" column so you can see functions bound to the same sequence right next to each other, to check for possible key sequences to bind functions to.
A general approach is that I bind several functions to key sequences beginning with "Ctrl+;" (control-semicolon). Nothing else uses that prefix, so it doesn't conflict with anything. You can use any prefix that is convenient for you.
The "right-click" operation is actually a specific function, called "show-context-menu". I bind "Ctrl+;, ." (control-semicolon, then period) to this function.
Once the context menu is visible, you can use down-arrow and up-arrow to move through the menu. Up-arrow on the first item goes to the last item. Also, when the context menu is visible, each menu item will have one letter underlined, which is the "accelerator" for that menu item. If you press that key while the menu is shown, it will execute that item, or simply select it if it has a submenu. If there are multiple items with that same accelerator, it will go to the first one, and the next one if you press it again. If it has a submenu, right-arrow will open the submenu.
In your situation, you would have to have the project selected in the project or package explorer. You could do that with the mouse. I'm not aware of good strategies for directly selecting a particular project in the explorer.
Another thing you'll want to do is look in the "Keys" list to see if the function you want to execute is defined, so you could bind a key sequence to it, but you'll still likely have to have the project selected when that sequence is pressed.
This process of exploring functions and keys is much more convenient if you use the "Emacs+" plugin (no elisp knowledge or use required). It provides functions for showing what key sequences are bound to which functions, and vice versa.
Well, you could always use a more general hotkey facility that isn't specific to RDi. If you're using Windows, I recommend AutoHotkey. This would let you assign keystrokes or mouse movements/clicks to any key combination you like.

VSCode how to automatically insert Intellisense suggestions without having to press Enter?

Default VS Code Intellisense behaviour
User is presented with a menu of suggestions
User then has to press the Up or Down arrow keys to navigate through the menu
Finally user has to confirm with Enter to insert the suggestion and close the dialog
What I would like instead
Don't need to press Enter
Suggestions are automatically inserted (and cycled through) by pressing Up/Down
Pressing any other keys will close the dialog and resume typing
To be clear, I want to replicate the default behaviour of YouCompleteMe:
When you type, a completion menu pops up. If you like the completions, you use the <Tab> key (by default, can be changed to <Enter> or <Down> arrow or whatever) to select a completion string you want. The very act of "tabbing through" the list to select the item you want inserts the candidate string. When you tab to a different candidate, the editor code is replaced with the new candidate. There is no accept key because by the point where you have the candidate you want selected in the menu the candidate has already been inserted in the editor. There is nothing to "accept". You just keep typing, the candidate has already been inserted.
Is such behaviour possible with Visual Studio Code, either by default or through a plugin?
The editor.tabCompletion option is the closest thing currently available:
By default, tab completion is disabled. Use the editor.tabCompletion setting to enable it. These values exist:
off - (default) Tab completion is disabled.
on - Tab completion is enabled for all suggestions and repeated invocations insert the next best suggestion.
onlySnippets - Tab completion only inserts static snippets which prefix match the current line prefix.
(Emphasis mine)
... except that the first Tab press hides the suggestion window.
I did some digging about editor.tabCompletion, and I found that closing the suggestion window is part of the tab completion's option original design, and that while other users have asked about an option not to close the suggestion window or specifically YouCompleteMe-style behaviour, that this is currently not supported.
"editor.acceptSuggestionOnEnter": "off",
To disable Enter to accept suggestion.

in a Eclipse view shortcut binding key does work for some operation but does not operate for others

We have a view that we developed, in this view at the beginning a keyboard shortcut key binding works. So I open a list. Then After right clicking the opened list item, I get the context menu. Now after getting this last context menu, I try to hide the list by clicking the same key binding. But the windows computer gives a sound of bing. It sounds like a focus lost but nope, The list item is higlighted. And when I press the item and then press the key binging it bings again. And interestingly the other keys does work. I can press other key options and they work but the shortcut key binding key that hides and shows the list of items does not work. When I right click to the item that does not work with certain key bindings, does work interestingly. any idea about this situation ?
We have used setEnabled in code, that disables the shortcuts. After deleting these enablement code we got the keys work as we want.

How to add a keyboard shortcut to the Team->Add command in eclipse

I would like to have keyboard shortcuts to Team->Add and Team->Commit in eclipse. I am using eGit.
I added them in Preferences->General->Keys and that works in that the keys show up on the menus next to Team->add and Team->commit.
However, when I press the keys nothing seems to happen. The little Key Assist window pops up after the first key and shows me the matching commands, with 'Add to Git index' included, but the file is not added to the git index.
More generally, I would like to be able to commit the current project to git without having to use the mouse.
Make sure that the Git command groups are available. Right-click a blank area of menu bar -> Customize perspective -> Command groups availability; make sure the 'Git' entry in the available command groups is selected.
When you add a keyboard shortcut in eclipse, you also have a scope attached to it (the "When" field, in Eclipse terms). Make sure that it's set to a scope that'll be in use when you fire the shortcut, like "Java editors" or the more broad "In Windows". (NB: I've not had a chance to test this myself, so I could be barking up the wrong tree).