Re: Visual block mode with right-to-left select

Good day

In VIM, if I start a visual block in normal mode with 'v', and muve my cursor left from the current position, the current character and anything to the left up to the cursor is selected as part of the block selection. ViEmu seems to skip the initial character that the cursor was on when I started the block mode select.

This also seems to apply to visual block mode. Am I missing something? I see that some others have had visual selection quirks -- is there a known workaround for this?



Re: Visual block mode with right-to-left select


Actually, the reason is that ViEmu implements vim's ":set selection=exclusive" mode, rather than the inclusive mode which is the default on most systems and the most popular one.

The reason is that I had used vim in Windows, where "exclusive" is the default, and I just emulated what I knew. Of course, I checked a lot of vim's documentation when implementing it, but nowhere nearly all of it (it's huge!), and I wasn't even aware of the "selection" setting.

Implementing both modes and the "selection" setting properly remains on the todo list and will be implemented in a future version. Unfortunately, I can't make a commitment as to exactly when, as I'm overly busy and the feature is non-trivial. Hopefully you can get accustomed to the current behavior.

Best regards,



Re: Visual block mode with right-to-left select

Hi Jon

At least it's "on the list" (:

I'll deal with it (: If I start my selection from the left, then it seems to work as I would expect (I say "seems" because obviously the selection still doesn't include what's under the cursor, but the selection area starts at the "right" place, and always just just keep on pressing an arrow key until the highlighted area encompasses what I want -- it's only one extra keypress  (:

By the way, I don't know if you recognise me from the mail (I'm the cheap South African  (: ), but another thought struck me: if you are willing, I can perhaps pitch in some time to the project. I wouldn't ask for payment -- but I also can't guarantee time. This project is useful to me -- I wouldn't mind at all contributing to it. Just let me know if I can help. Of course, I make this offer without any prior knowledge of building a plugin for VS. But still, the offer is there -- and I'm a very quick learner.


Re: Visual block mode with right-to-left select

I did recognize you, of course! smile I still have to respond your last emails.

Thanks for being understanding with the feature request. I tend to use text object motions (diw, di(, c%, etc...) more than visual mode (except when selecting multiple lines), so I don't encounter the problem that often.

And mainly thanks for the offer to help out. Right now, I wouldn't be comfortable with this as I'm charging for the product. For external improvements, I'm planning to implement a scripting system of some sort in a future ViEmu, and that will be the way to bring the power of collaboration to ViEmu.


  -- Jon


Re: Visual block mode with right-to-left select


Well, the offer remains. Since I couldn't guarantee how much time I could contribute and when, I wouldn't expect remuneration. I would kind of consider this like other opensource projects that I've contributed on. But I do understand your position. If you change your mind, I'm only an email away.

The scripting idea sounds very cool. Perhaps you could implement a loose binding for a well-known scripting language and leverage off of existing libraries. Python springs to mind -- it's often embedded in applications because it's relatively easy to do. Another alternative might be Lua -- it's smaller and quite light, but a lot more arcane. Python bindings would really open up community contribution possibilities, imo.


Re: Visual block mode with right-to-left select

Thanks for the offer again.

Python is definitely one of the options and I can see the advantages. A javascript-alike is the other one, mainly because I already have a full implementation of a compiler & VM, and it would remove any dependency from external code. We've discussed this in the forum before.

It's some time away, anyway.