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:
parent
f8ab86f930
commit
75f1862268
8 changed files with 337 additions and 10 deletions
24
crates/vim/test_data/test_ctrl_v.json
Normal file
24
crates/vim/test_data/test_ctrl_v.json
Normal 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"}}
|
11
crates/vim/test_data/test_ctrl_v_control.json
Normal file
11
crates/vim/test_data/test_ctrl_v_control.json
Normal 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"}}
|
10
crates/vim/test_data/test_ctrl_v_escape.json
Normal file
10
crates/vim/test_data/test_ctrl_v_escape.json
Normal 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"}}
|
Loading…
Add table
Add a link
Reference in a new issue