ulyssa / modalkit

A Rust library for building modal editing applications
Apache License 2.0
49 stars 5 forks source link

Support replacing selection with paste in Visual mode #85

Closed ulyssa closed 1 year ago

ulyssa commented 1 year ago

The current InsertAction::Paste behaviour is to paste register contents before or after the cursor. However, when pasting in Vim's Visual mode, the register contents should replace the current selection. I'm going to make InsertAction::Paste take a new PasteStyle type, which will allow specifying what type of behaviour to do:

This will also help with representing Kakoune's p, P, and R keybindings in #32.