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
152 stars 4 forks source link

Add real cursor movement commands #41

Closed dawsers closed 4 months ago

dawsers commented 4 months ago

The only thing I really missed about you plugin was being able to skip lines when adding new cursors. This PR adds commands to be able to move the real cursor while leaving the virtual ones where they are. This gives more flexibility to create cursors where needed. For example, you can create some cursors downward and when you hit an empty line, move the real cursor where you want, and continue adding cursors.

brenton-leighton commented 4 months ago

Hey, thanks for the contribution. My main concern would be that this doesn't support all movement commands, which someone else might ask for. There's two ways I can think to solve this:

  1. Add a command to toggle locking/unlocking the virtual cursors
  2. Add an table to options like custom_key_maps that allows you to set mappings that won't affect the virtual cursors

Would either of those work for you?

dawsers commented 4 months ago

I think you are totally right, and option 1 would be best. I will try to implement something like that. Thank you for the suggestion.

I will close this PR then.