brenton-leighton / multiple-cursors.nvim

A multi-cursor plugin for Neovim that works in normal, insert/replace, or visual modes, and with almost every command
Apache License 2.0
248 stars 7 forks source link

feat: preserve selection when creating cursors from visual mode #51

Closed b0o closed 5 months ago

b0o commented 5 months ago

For example, in this scenario:

https://github.com/brenton-leighton/multiple-cursors.nvim/assets/21299126/a393e2c8-0397-4de2-8ad3-1f19bf3fad3f

It would be nice if each subsequent cursor maintained the visual selection of ipsum.

brenton-leighton commented 5 months ago

You're using the search command (MultipleCursorsAddMatches) to add the cursors, right?

b0o commented 5 months ago

In the screencast above, I was creating a visual selection and then using MultipleCursorsAddDown.

It would be nice if it worked in all cases, MultipleCursorsAdd{Up,Down} and MultipleCursorsAddMatches.

(I used to use mg979/vim-visual-multi and that's how it worked there.)

brenton-leighton commented 5 months ago

OK I think I can do that.

brenton-leighton commented 5 months ago

I think this should do it: #54.

Let me know if it's OK.