Rewrite paste

- vim: support P for paste before
- vim: support P in visual mode for paste without overriding clipboard
- vim: fix position when using `p` on text copied outside zed
- vim: fix indentation when using `p` on text copied from zed
This commit is contained in:
Conrad Irwin
2023-08-22 13:27:57 -06:00
parent 31db5e4f62
commit 33d7fe02ee
14 changed files with 779 additions and 376 deletions
+31
View File
@@ -0,0 +1,31 @@
{"Put":{"state":"The quick brown\nfox ˇjumps over\nthe lazy dog"}}
{"Key":"v"}
{"Key":"w"}
{"Key":"y"}
{"ReadRegister":{"name":"\"","value":"jumps o"}}
{"Put":{"state":"The quick brown\nfox jumps oveˇr\nthe lazy dog"}}
{"Key":"p"}
{"Get":{"state":"The quick brown\nfox jumps overjumps ˇo\nthe lazy dog","mode":"Normal"}}
{"Put":{"state":"The quick brown\nfox jumps oveˇr\nthe lazy dog"}}
{"Key":"shift-p"}
{"Get":{"state":"The quick brown\nfox jumps ovejumps ˇor\nthe lazy dog","mode":"Normal"}}
{"Put":{"state":"The quick brown\nfox juˇmps over\nthe lazy dog"}}
{"Key":"d"}
{"Key":"d"}
{"ReadRegister":{"name":"\"","value":"fox jumps over\n"}}
{"Get":{"state":"The quick brown\nthe laˇzy dog","mode":"Normal"}}
{"Key":"p"}
{"Get":{"state":"The quick brown\nthe lazy dog\nˇfox jumps over","mode":"Normal"}}
{"Key":"k"}
{"Key":"shift-p"}
{"Get":{"state":"The quick brown\nˇfox jumps over\nthe lazy dog\nfox jumps over","mode":"Normal"}}
{"Put":{"state":"The quick brown\nfox jumps ˇover\nthe lazy dog"}}
{"Key":"v"}
{"Key":"j"}
{"Key":"y"}
{"ReadRegister":{"name":"\"","value":"over\nthe lazy do"}}
{"Key":"p"}
{"Get":{"state":"The quick brown\nfox jumps oˇover\nthe lazy dover\nthe lazy dog","mode":"Normal"}}
{"Key":"u"}
{"Key":"shift-p"}
{"Get":{"state":"The quick brown\nfox jumps ˇover\nthe lazy doover\nthe lazy dog","mode":"Normal"}}