Vsvim: Shift-A doesn't work in visual block mode

Created on 5 Jun 2013  路  12Comments  路  Source: VsVim/VsVim

In Vim, when you have some text and want to add some text to the end of every line, you can do this with visual block mode, even if the line endings are jagged (if they don't all end in the same column.)

initial

CTRL-V 4 k $

selected

SHIFT-A " + \ESC

added

This does not work in VsVim 14.0.1. Instead, the visual block stays rectangular (does not select to the jagged edges, the the cursor goes to the end of the current line), and it just makes a "bing" sound when I press SHIFT-A. (I would attach a screenshot but my current theme doesn't make selected text show up very clearly.)

bug

Most helpful comment

I was fixing a bug in block insert and it was easy to add block append, so I included it in PR #2211.

All 12 comments

Thanks for reporting, i will take a look at that.

Note that when I fix this bug the selection may look slightly different in VsVim. I don't believe that the Visual Studio editor supports jagged block selection of that nature. I believe it will instead try to make it look completely square when you attempt such a selection.

If I'm right that will just be a visual fluke. Implementation wise the operations will still affect the same content as it would in gVim.

Okay, thanks. Yeah, the visual aspect is not so important—I didn't even notice it was wrong until after I realized it wasn't working. Normally I do things so fast in Vim that I don't take time to see whether things look exactly right unless something goes fishy. :)

Question completely unrelated to the bug. How did you upload the images that you reference in this bug?

I just dragged and dropped them onto the post. Why?

I was adding some images to the WIKI last night and had to jump through a few hoops. The solution I ended up with was checking the images into the WIKI repository and using a relative reference. I looked at this bug right afterwards, noticed your images were hosted in a completely different place and was just curious how you got them uploaded.

Wow, that is strange! Don't know what to tell you. :(

I think it may just be different for WIKI and issue entries.

Hey @jaredpar: Apologies! It looks like I made a significant error when I initially transcribed this: I put CTRL-A whereas in reality it is of course SHIFT-A. Yikes! Hope that didn't mess you up!!

+1

I am trying to insert some text after every line of a file and it looks like the Shift-A part is failing for me also.

The following is the commands i'm trying.
1) ggVG$A
2) enter appending text
3) hit esc

+1

+1

I'm using a work-around from here. You (v)isually select part of the target lines, press ":" to get the range filled in for you, then (s)ubstitute the end of the line ($) with your text.

E.g. if you have this text and your cursor is on the first line:

aaaa
bbbbb
cc

Type "vjj:s/$/123/" and hit enter and you get this:

aaaa123
bbbbb123
cc123

I was fixing a bug in block insert and it was easy to add block append, so I included it in PR #2211.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fiveNinePlusR picture fiveNinePlusR  路  10Comments

jcouv picture jcouv  路  27Comments

jaredpar picture jaredpar  路  11Comments

TKumadaki picture TKumadaki  路  17Comments

EdwinVanRooij picture EdwinVanRooij  路  14Comments