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:
parent
3c3dad6830
commit
001f17c011
13 changed files with 454 additions and 66 deletions
|
@ -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("")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue