XVim icon indicating copy to clipboard operation
XVim copied to clipboard

Support balance delimiter selection in visual mode

Open MarcoSero opened this issue 9 years ago • 4 comments

First off I'd like to start by thanking everyone who has worked on this plugin, I could't live without it!

Now onto the question: I used to use the "Balance Delimiter" feature in Xcode quite a lot. It's great for highlighting code between square brackets and keep expanding the selection.

It would be great if this could work with Xvim. Right now invoking the action balance: moves the cursor to the opening bracket, but without highlighting the content in visual mode.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

MarcoSero avatar Aug 03 '15 08:08 MarcoSero

Sorry for really late reply. So what you want is entering Visual mode when you execute balance: ?

JugglerShu avatar Dec 31 '15 17:12 JugglerShu

Yes, that’s the behavior I would like to have.

On 31 Dec 2015, at 18:07, JugglerShu <[email protected] mailto:[email protected]> wrote:

Sorry for really late reply. So what you want is entering Visual mode when you execute balance: ?

— Reply to this email directly or view it on GitHub https://github.com/XVimProject/XVim/issues/798#issuecomment-168223712.

MarcoSero avatar Jan 02 '16 10:01 MarcoSero

+1

luca-bernardi avatar Feb 09 '16 21:02 luca-bernardi

Hi! It seems that this issue is partly fixed. When using the balance delimiter, the selection is correctly highlighted in any mode, but it seems that the modification commands don't apply correctly on the new selection. I notice the same bug while developing one of the new Xcode Editor Extension. As soon as I modify the current selection, XVim seems to not be aware of it and if I hit d or c or any command like that, it just unselect everything and do nothing.

Step to reproduce:

  1. put your cursor inside a block
  2. Select menu Editor->Structure->Balance delimiter -> it should select the whole block
  3. Tap d -> it should remove the block but it simply unselects everything instead

FredericRuaudel avatar Nov 21 '16 05:11 FredericRuaudel