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

@ -70,7 +70,11 @@ impl ModeIndicator {
recording
.chain(vim.pre_count.map(|count| format!("{}", count)))
.chain(vim.selected_register.map(|reg| format!("\"{reg}")))
.chain(vim.operator_stack.iter().map(|item| item.id().to_string()))
.chain(
vim.operator_stack
.iter()
.map(|item| item.status().to_string()),
)
.chain(vim.post_count.map(|count| format!("{}", count)))
.collect::<Vec<_>>()
.join("")