Vim: Multiple selections do not work as expected

Created on 8 Jul 2016  路  15Comments  路  Source: VSCodeVim/Vim

Issue Summary

Only the first selection is operated upon when there are multiple selections.

Steps to Reproduce

  1. Have multiple cursors active with multiple selections. (I used CMD-D)
  2. Notice that the status bar indicates "visual mode". In visual mode, an operator command will act upon all highlighted(selected) characters.
  3. Type an operator command like "c" or "d".
  4. Notice that only the first selection is acted upon.
  5. VSCode Version: 1.3.0
  6. OS: OSX 10.11.5
help wanted sizL

Most helpful comment

Alright, that is a huge amount of support. I will do this immediately after I finish Visual Block mode.

THE PEOPLE HAVE SPOKEN.

All 15 comments

I generally use . to repeat a command in multiple places. I have been thinking about a separate Vim mode for multiple selections, however. It'd be a bit of work because it's essentially a new mode that doesn't exist in Vim.

For whatever it is worth, the Vim emulation in both Atom and in Sublime Text works as I'd expect in this case: all selections are acting upon identically.

@dahjelle unfortunately, the APIs that these IDEs expose are vastly different from each other. as a result, all the vim emulators are different beasts (ie. no shared code).

Wow, this is getting more interest than I had previously anticipated. Bumping the priority up.

Just my 2c: This is the only reason I used amVim over this extension - on that extension it allows multi cursors.

Alright, that is a huge amount of support. I will do this immediately after I finish Visual Block mode.

THE PEOPLE HAVE SPOKEN.

Update: Just merged visual block mode into master, so I'll be working on this next.

No promises, but with any luck it won't take more than a week to implement.

Working on it over here: #587

Done!! Took a little longer than my initial estimate, heh.

You're a legend @johnfn, thank you!

@frederickfogerty, what are the normal ways that you would trigger multiple selections in visual studio code? One that I know of is cmd-d - what other ways do you use frequently?

@johnfn I just use Cmd-d. In vim I use C-n (https://github.com/terryma/vim-multiple-cursors), but for VSCode I've just used Cmd-d.

Cool! Cmd-d is actually the only one I've implemented so far, but the infrastructure is there for any other multicursor actions that people want added. :)

I am not seeing where this current behavior is implemented. I have version 0.0.28 on the MAC. Is this not in the release build yet?

I'm on 0.5.1 and still seeing issues with multi-cursors (cmd+d).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ACollectionOfAtoms picture ACollectionOfAtoms  路  3Comments

spinningarrow picture spinningarrow  路  3Comments

triztian picture triztian  路  3Comments

Jimmy-Z picture Jimmy-Z  路  3Comments

st-schneider picture st-schneider  路  3Comments