1

Re: Visual selection mode - off-by-one error

I purchased ViEmu last week and am extremely happy with it.

One small bug I'd like to mention, though, is that when you visually select text by moving backwards, the last character that should be selected is missed.

For example, with a line containing 'goodbye cruel world':

With ViEmu, if you move the cursor to the last character of 'cruel', press 'v' and then 'b', your selection contains 'crue'.

With Vim, your selection would contain 'cruel'.

To select the whole word, you have to move the cursor to the space after 'cruel' and begin your selection, or move to the start of the word and select forwards.

Cheers!

2

Re: Visual selection mode - off-by-one error

Rik, I'm glad you like ViEmu.

Regarding selection: when I initially implemented visual mode emulation, I had vim with the configuration set to "set selection=exclusive", so I actually emulated that. Later on, I learned about the option itself and the "set selection=inclusive" variation, which is the behavior you are expecting.

I am planning to include support for that option in a later version, I hope it won't be too unbearable to live with it while I come round to it.

One important reason some of the seemingly minor improvements are getting a bit delayed is that I'm preparing a brand new vi/vim core for the next version, which is almost ready (everything but ex emulation is already working). Thanks to the new architecture, this new core already supports many new features, but it's not complete yet, and I don't want to implement these small features twice (once for the 'old' core, once for the 'new' one). I hope you'll be understanding.

Best!

3

Re: Visual selection mode - off-by-one error

JNG wrote:

I am planning to include support for that option in a later version, I hope it won't be too unbearable to live with it while I come round to it.

Absolutely not. Being able to use vi keys makes my editing about 3x faster; little differences from what I'm used to with vim don't cause me much trouble - I just need to get used to them. I'm trying to train myself to use Ctrl-Y instead of Ctrl-R, too!

4

Re: Visual selection mode - off-by-one error

Ctrl-R does work, as long as you remove all keybindings starting with Ctrl-R from Tools|Options|Keyboard. An automatic clashing-keybinding removal utility will be included in the next major version of ViEmu (it's about time...).

5

Re: Visual selection mode - off-by-one error

JNG wrote:

Ctrl-R does work, as long as you remove all keybindings starting with Ctrl-R from Tools|Options|Keyboard. An automatic clashing-keybinding removal utility will be included in the next major version of ViEmu (it's about time...).

I'll remove the current bindings then - that's great news.

Thanks!

6

Re: Visual selection mode - off-by-one error

Just wondering... is there a quick way to find out which bindings use Ctrl-R?

7

Re: Visual selection mode - off-by-one error

A.1) Open Tools|Options|Keyboard
A.2) Click on the "Shortcut key" edit box
A.3) Press Ctrl-R
A.4) The combo-box below now contains all keybindings that start with Ctrl-R

In order to remove them one by one (you "only" have to remove the ones listed as "global" or as "text editor"):

B.1) Click on the "Show commands containing:" edit box on the top of the dialog
B.2) Type in a part of the command you are trying to unassign (it needn't be the start of the command)
B.3) The listbox showing commands will shrink its selection to those commands containing the substring you typed
B.4) Click on the command
B.5) The "Remove" buttons should now be enabled - click it to remove the binding
B.6) Repeat steps B.1-B.5 for every keybinding in the combo box below (see A.4)

It is a royal pain. The reason why I have delayed implementing the automatic removal tool is that you (and I) only have to do it once for each VS install. But the next major version has it, promised.

8

Re: Visual selection mode - off-by-one error

It wasn't too bad, thanks. Only took a minute.