3

I'm trying to do a block selection using jVi in Netbeans. I cannot seem to get it working - there seems to be a lot of good info on this topic, however I'm not seeing the answer to my problem.

This is what I understand: to do a block select, you first enter visual mode and select some text. Then you hit Ctrl-V to enter block select mode? For me, Ctrl-V pastes the clipboard, so I found someone mentioned Ctrl-Q. I try that, but I cannot get text to select in a column using the arrow keys or the h,j,k,l keys. For me, it just does a regular selection grabbing the rest of the line, and the line below (if I move the cursor down) up to the cursor.

What am I missing?

3 Answers3

5

jVi has options to specify which control keys are handled by jVi and which passed on to NetBeans for processing. Your description indicates that Ctrl-V is being handled by NB (not by jVi). In NetBeans look at
Tools > Options > jViConfig > Ctrl-Key Bindings
and enable/check the keys that jVi should process.

Ernie Rael
  • 534
  • 7
  • 11
0

This worked for me - combining both suggestions from above. In jVi settings page, enable Ctrl-Q and use it for classic Ctrl-V functionality. Do not enable Ctrl-V as it has too many side effects wrt handling of mouse selection buffer. Works nicely in this way for me with netbean 8.2.

cray
  • 1
0

Make sure you're not in a special more before you start (just press ESC a few times). It's also possible that some of your jVi startup scripts are remapping those keys.

Ctrl-V is the default, but Ctrl-Q was introduces on gvim on Windows, to avoid confusing users who knew Ctrl-v is for pasting text. You can look at your key mappings by typing

:map

in command-mode. You can even do

:verbose map

to find out where each mapping was defined. I think that only lists user-set mappings, so it'll show you when Ctrl-V and Ctrl-Q were re-defined by a script.

Shalom Craimer
  • 20,659
  • 8
  • 70
  • 106