Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple selections do not work as expected #417

Closed
mikeraimondi opened this issue Jul 8, 2016 · 15 comments
Closed

Multiple selections do not work as expected #417

mikeraimondi opened this issue Jul 8, 2016 · 15 comments

Comments

@mikeraimondi
Copy link

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.
  • VSCode Version: 1.3.0
  • OS: OSX 10.11.5
@johnfn
Copy link
Member

johnfn commented Jul 9, 2016

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.

@dahjelle
Copy link

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.

@jpoon
Copy link
Member

jpoon commented Jul 21, 2016

@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).

@johnfn johnfn added the size/L label Jul 25, 2016
@johnfn johnfn added this to the v0.2 milestone Jul 25, 2016
@johnfn
Copy link
Member

johnfn commented Jul 25, 2016

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

@frederickfogerty
Copy link
Contributor

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

@johnfn
Copy link
Member

johnfn commented Jul 26, 2016

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

THE PEOPLE HAVE SPOKEN.

@johnfn
Copy link
Member

johnfn commented Aug 9, 2016

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.

@johnfn
Copy link
Member

johnfn commented Aug 10, 2016

Working on it over here: #587

@johnfn
Copy link
Member

johnfn commented Oct 1, 2016

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

@johnfn johnfn closed this as completed Oct 1, 2016
@frederickfogerty
Copy link
Contributor

You're a legend @johnfn, thank you!

@johnfn
Copy link
Member

johnfn commented Oct 1, 2016

@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?

@frederickfogerty
Copy link
Contributor

@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.

@johnfn
Copy link
Member

johnfn commented Oct 1, 2016

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. :)

@BrutalSimplicity
Copy link

BrutalSimplicity commented Oct 14, 2016

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?

@andradei
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants