1

Re: Combine highlighting & mouse selection

I have an interesting question about ViEmu.  When I use the mouse to select several lines of code in VS, I can then perform some action on that code.  Like pressing Ctrl-Alt-M to run the extract method refactoring on the selection.  The same goes for SQL Management Studio.  I can select some SQL with the mouse and press Alt-X to execute just that selection.

However, if I use ViEmus 'v' keystroke to highlight several lines, I cannot execute any code using those lines.

Would it be possible to combined the two so that using 'v' to highlight some code / sql mimics the behavior of selecting the same text using the mouse?

2

Re: Combine highlighting & mouse selection

Hi Griffin,

ViEmu by default uses its own selection highlighting mechanism. Thus, the text selected with 'v' is not actually 'selected' for the rest of Visual Studio. The reason for this is to more closely emulate vim's selection behavior (VS can't have the cursor anywhere but on one of the endpoints of the selection if there is one, for example).

For interactions, you can use either of the following mechanisms:

1) The 'gS' normal mode command selects the current visual area with VS's mechanism. This is valid for the next keystroke only, but you can use it as "gS<Alt-X>" to keep the ViEmu selection mechanism by default and overcome the difference only once in a while.

2) You can select "Use VS selection for Visual Mode" or "Use standard selection for Visual Mode" in the ViEmu/VS or ViEmu/SQL selections dialog to make ViEmu use the regular selection mechanism. This maximizes compatibility, at the expense of more trustworthy emulation of visual mode.

Let me know if there is anything else!

3

Re: Combine highlighting & mouse selection

Jon,

#2 is exactly what I was looking for! 

Thanks so much.

- Griffin

4

Re: Combine highlighting & mouse selection

You're welcome, this comes up every so often smile