vim: Implement named registers (#12895)

Release Notes:

- vim: Add support for register selection `"a`-`"z`, `"0`-`"9`, `"-`.
`"_` and `"%`
([#11511](https://github.com/zed-industries/zed/issues/11511))

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
This commit is contained in:
Paul Eguisier
2024-06-12 10:40:27 -06:00
committed by GitHub
co-authored by Conrad Irwin
parent 3c3dad6830
commit 001f17c011
13 changed files with 454 additions and 66 deletions
+11 -3
View File
@@ -39,9 +39,17 @@ impl ModeIndicator {
fn current_operators_description(&self, vim: &Vim) -> String {
vim.state()
.operator_stack
.iter()
.map(|item| item.id())
.pre_count
.map(|count| format!("{}", count))
.into_iter()
.chain(vim.state().selected_register.map(|reg| format!("\"{reg}")))
.chain(
vim.state()
.operator_stack
.iter()
.map(|item| item.id().to_string()),
)
.chain(vim.state().post_count.map(|count| format!("{}", count)))
.collect::<Vec<_>>()
.join("")
}