0

This is basically the same question as this except for Netbeans 8.0.2 (running under jMonkeyEngine SDK 3.1-alpha1) instead of Visual Studio.

Honestly, the aforemetnioned link says it better than I can, but basically I'm a vim key binding user, and have the netbeans jVi plugin installed and want to map, for example, alt-j and alt-k to scroll through the code completion list instead of the arrow keys:

How do I scroll through this list without arrow keys?

I've searched through Tools->Options->Keymap, as well as the the JVi configs at Tools->Options->jViConfig. I don't see anything at all under jViConfig, so I think the standard NetBeans key bindings are the way to go.

I have tried modifying most of the obvious down keys e.g insertion point down, scroll down, page down etc, but they all affect the underlying text in the editor, never the completion list.

enter image description here

And: enter image description here

Does anyone know of a way to do this?
Or maybe a plugin to provide the functionality?
It simply appears that the raw arrow key movements are not mappable by netbeans (?).

Note: this is possible to do in Visual Studio 2015, so I'm hoping it's possible in NetBeans as well.

Many Thanks.

Community
  • 1
  • 1
vt5491
  • 2,254
  • 2
  • 22
  • 34

1 Answers1

1

AFAIK, there is no way to do this in NetBeans. At least there wasn't in 2010, when I filed the NetBeans bug hint completion makes assumptions about associated editor pane bindings. I maintain jVi. I filed the bug since I was having trouble with completion bindings for some special keys. In the NB source take a look at

editor.completion/src/org/netbeans/modules/editor/completion/CompletionScrollPane.java

And you'll see a bunch of hardcoded stuff.

In the jVi source

nbvi/nbvi-module/src/org/netbeans/modules/jvi/KeyBindings.java

method fixupKeypadKeys, you see what jVi does (given the fix for the bug I filed). This is part of some arcane code that depends on being friend with some NB editor package.

You could file a bug with NB. If you provided NB a patch, they might incorporate it. If you file a NB bug, cc me (err at netbeans.org)

Alternately, you could try adding some code to the jVi file to add your keybindings.

Ernie Rael
  • 534
  • 7
  • 11