vim: Add (half of) ctrl-v/ctrl-q (#19585)

Release Notes:

- vim: Add `ctrl-v`/`ctrl-q` to type any unicode code point. For example
`ctrl-v escape` inserts an escape character(U+001B), or `ctrl-v u 1 0 E
2` types ტ (U+10E2). As in vim `ctrl-v ctrl-j` inserts U+0000 not
U+000A. Zed does not yet implement insertion of the vim-specific
representation of the typed keystroke for other keystrokes.
- vim: Add `ctrl-shift-v` as an alias for paste on Linux
This commit is contained in:
Conrad Irwin 2024-10-31 23:25:42 -06:00 committed by GitHub
parent f8ab86f930
commit 75f1862268
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 337 additions and 10 deletions

View file

@ -0,0 +1,24 @@
{"Put":{"state":"ˇ"}}
{"Key":"i"}
{"Key":"ctrl-v"}
{"Key":"0"}
{"Key":"0"}
{"Key":"0"}
{"Get":{"state":"\u0000ˇ","mode":"Insert"}}
{"Key":"ctrl-v"}
{"Key":"j"}
{"Get":{"state":"\u0000jˇ","mode":"Insert"}}
{"Key":"ctrl-v"}
{"Key":"x"}
{"Key":"6"}
{"Key":"5"}
{"Get":{"state":"\u0000jeˇ","mode":"Insert"}}
{"Key":"ctrl-v"}
{"Key":"U"}
{"Key":"1"}
{"Key":"F"}
{"Key":"6"}
{"Key":"4"}
{"Key":"0"}
{"Key":"space"}
{"Get":{"state":"\u0000je🙀 ˇ","mode":"Insert"}}

View file

@ -0,0 +1,11 @@
{"Put":{"state":"ˇ"}}
{"Key":"i"}
{"Key":"ctrl-v"}
{"Key":"ctrl-d"}
{"Get":{"state":"\u0004ˇ","mode":"Insert"}}
{"Key":"ctrl-v"}
{"Key":"ctrl-j"}
{"Get":{"state":"\u0004\u0000ˇ","mode":"Insert"}}
{"Key":"ctrl-v"}
{"Key":"tab"}
{"Get":{"state":"\u0004\u0000\tˇ","mode":"Insert"}}

View file

@ -0,0 +1,10 @@
{"Put":{"state":"ˇ"}}
{"Key":"i"}
{"Key":"ctrl-v"}
{"Key":"9"}
{"Key":"escape"}
{"Get":{"state":"ˇ\t","mode":"Normal"}}
{"Key":"i"}
{"Key":"ctrl-v"}
{"Key":"escape"}
{"Get":{"state":"\u001bˇ\t","mode":"Insert"}}