vim: Add Multi Replace mode in Vim (#8469)

For #4440, I've only added support for normal, if it's visual mode,
would we like this to delete the current selection row and enter insert
mode?

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
This commit is contained in:
Hans 2024-03-15 10:31:53 +08:00 committed by GitHub
parent 72d36d0213
commit e836a979a2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 584 additions and 16 deletions

View file

@ -0,0 +1,48 @@
{"Put":{"state":"ˇThe quick brown\nfox jumps over\nthe lazy dog."}}
{"Key":"shift-r"}
{"Key":"O"}
{"Key":"n"}
{"Key":"e"}
{"Get":{"state":"Oneˇ quick brown\nfox jumps over\nthe lazy dog.","mode":"Replace"}}
{"Put":{"state":"The quick browˇn\nfox jumps over\nthe lazy dog."}}
{"Key":"shift-r"}
{"Key":"O"}
{"Key":"n"}
{"Key":"e"}
{"Get":{"state":"The quick browOneˇ\nfox jumps over\nthe lazy dog.","mode":"Replace"}}
{"Put":{"state":"The quick brown\nˇ\nfox jumps over\nthe lazy dog."}}
{"Key":"shift-r"}
{"Key":"O"}
{"Key":"n"}
{"Key":"e"}
{"Get":{"state":"The quick brown\nOneˇ\nfox jumps over\nthe lazy dog.","mode":"Replace"}}
{"Put":{"state":"ˇThe quick brown\nfox jumps over\nthe lazy ˇdog."}}
{"Key":"shift-r"}
{"Key":"O"}
{"Key":"n"}
{"Key":"e"}
{"Get":{"state":"Oneˇ quick brown\nfox jumps over\nthe lazy Oneˇ.","mode":"Replace"}}
{"Put":{"state":"The quˇick brown\nfox jumps over\nthe lazy dog."}}
{"Key":"shift-r"}
{"Key":"enter"}
{"Key":"O"}
{"Key":"n"}
{"Key":"e"}
{"Get":{"state":"The qu\nOneˇ brown\nfox jumps over\nthe lazy dog.","mode":"Replace"}}
{"Put":{"state":"ˇThe quick brown\nfox jumps over\nthe lazy ˇdog."}}
{"Key":"shift-r"}
{"Key":"O"}
{"Key":"n"}
{"Key":"e"}
{"Get":{"state":"Oneˇ quick brown\nfox jumps over\nthe lazy Oneˇ.","mode":"Replace"}}
{"Key":"enter"}
{"Key":"T"}
{"Key":"w"}
{"Key":"o"}
{"Get":{"state":"One\nTwoˇck brown\nfox jumps over\nthe lazy One\nTwoˇ","mode":"Replace"}}
{"Put":{"state":"ˇThe quick brown\nfox jumps over\nthe lazy ˇdog."}}
{"Key":"shift-r"}
{"Key":"O"}
{"Key":"n"}
{"Key":"e"}
{"Get":{"state":"Oneˇ quick brown\nfox jumps over\nthe lazy Oneˇ.","mode":"Replace"}}

View file

@ -0,0 +1,124 @@
{"Put":{"state":"ˇThe quick brown fox jumps over the lazy dog."}}
{"Key":"shift-r"}
{"Key":"O"}
{"Key":"n"}
{"Key":"e"}
{"Key":"backspace"}
{"Key":"backspace"}
{"Key":"backspace"}
{"Get":{"state":"ˇThe quick brown fox jumps over the lazy dog.","mode":"Replace"}}
{"Put":{"state":"ˇThe quick brown fox jumps over the lazy dog."}}
{"Key":"shift-r"}
{"Key":"O"}
{"Key":"enter"}
{"Key":"e"}
{"Key":"backspace"}
{"Key":"backspace"}
{"Key":"backspace"}
{"Get":{"state":"ˇThe quick brown fox jumps over the lazy dog.","mode":"Replace"}}
{"Put":{"state":"ˇThe quick brown fox jumps over the lazy dog."}}
{"Key":"shift-r"}
{"Key":"O"}
{"Key":"enter"}
{"Key":"n"}
{"Key":"enter"}
{"Key":"e"}
{"Key":"backspace"}
{"Key":"backspace"}
{"Key":"backspace"}
{"Key":"backspace"}
{"Key":"backspace"}
{"Get":{"state":"ˇThe quick brown fox jumps over the lazy dog.","mode":"Replace"}}
{"Put":{"state":"The quick browˇn\nfox jumps over\nthe lazy dog."}}
{"Key":"shift-r"}
{"Key":"O"}
{"Key":"n"}
{"Key":"e"}
{"Key":"backspace"}
{"Key":"backspace"}
{"Key":"backspace"}
{"Get":{"state":"The quick browˇn\nfox jumps over\nthe lazy dog.","mode":"Replace"}}
{"Put":{"state":"The quick browˇn\nfox jumps over\nthe lazy dog."}}
{"Key":"shift-r"}
{"Key":"O"}
{"Key":"enter"}
{"Key":"e"}
{"Key":"backspace"}
{"Key":"backspace"}
{"Key":"backspace"}
{"Get":{"state":"The quick browˇn\nfox jumps over\nthe lazy dog.","mode":"Replace"}}
{"Put":{"state":"The quick browˇn\nfox jumps over\nthe lazy dog."}}
{"Key":"shift-r"}
{"Key":"O"}
{"Key":"enter"}
{"Key":"n"}
{"Key":"enter"}
{"Key":"e"}
{"Key":"backspace"}
{"Key":"backspace"}
{"Key":"backspace"}
{"Key":"backspace"}
{"Key":"backspace"}
{"Get":{"state":"The quick browˇn\nfox jumps over\nthe lazy dog.","mode":"Replace"}}
{"Put":{"state":"The quick brown\nˇ\nfox jumps over\nthe lazy dog."}}
{"Key":"shift-r"}
{"Key":"O"}
{"Key":"n"}
{"Key":"e"}
{"Key":"backspace"}
{"Key":"backspace"}
{"Key":"backspace"}
{"Get":{"state":"The quick brown\nˇ\nfox jumps over\nthe lazy dog.","mode":"Replace"}}
{"Put":{"state":"The quick brown\nˇ\nfox jumps over\nthe lazy dog."}}
{"Key":"shift-r"}
{"Key":"O"}
{"Key":"enter"}
{"Key":"e"}
{"Key":"backspace"}
{"Key":"backspace"}
{"Key":"backspace"}
{"Get":{"state":"The quick brown\nˇ\nfox jumps over\nthe lazy dog.","mode":"Replace"}}
{"Put":{"state":"The quick brown\nˇ\nfox jumps over\nthe lazy dog."}}
{"Key":"shift-r"}
{"Key":"O"}
{"Key":"enter"}
{"Key":"n"}
{"Key":"enter"}
{"Key":"e"}
{"Key":"backspace"}
{"Key":"backspace"}
{"Key":"backspace"}
{"Key":"backspace"}
{"Key":"backspace"}
{"Get":{"state":"The quick brown\nˇ\nfox jumps over\nthe lazy dog.","mode":"Replace"}}
{"Put":{"state":"The quick browˇn\nfox jumps over\nthe lazy ˇdog."}}
{"Key":"shift-r"}
{"Key":"O"}
{"Key":"n"}
{"Key":"e"}
{"Key":"backspace"}
{"Key":"backspace"}
{"Key":"backspace"}
{"Get":{"state":"The quick browˇn\nfox jumps over\nthe lazy ˇdog.","mode":"Replace"}}
{"Put":{"state":"The quick browˇn\nfox jumps over\nthe lazy ˇdog."}}
{"Key":"shift-r"}
{"Key":"O"}
{"Key":"enter"}
{"Key":"e"}
{"Key":"backspace"}
{"Key":"backspace"}
{"Key":"backspace"}
{"Get":{"state":"The quick browˇn\nfox jumps over\nthe lazy ˇdog.","mode":"Replace"}}
{"Put":{"state":"The quick browˇn\nfox jumps over\nthe lazy ˇdog."}}
{"Key":"shift-r"}
{"Key":"O"}
{"Key":"enter"}
{"Key":"n"}
{"Key":"enter"}
{"Key":"e"}
{"Key":"backspace"}
{"Key":"backspace"}
{"Key":"backspace"}
{"Key":"backspace"}
{"Key":"backspace"}
{"Get":{"state":"The quick browˇn\nfox jumps over\nthe lazy ˇdog.","mode":"Replace"}}