Implement Indent & Outdent as operators (#12430)

Release Notes:

- Fixes [#9697](https://github.com/zed-industries/zed/issues/9697).

Implements `>` and `<` with motions and text objects.
Works with repeat action `.`
This commit is contained in:
Paul Eguisier 2024-06-04 23:17:01 +02:00 committed by GitHub
parent 25050e8027
commit 8a659b0c60
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 150 additions and 3 deletions

View file

@ -61,6 +61,8 @@ pub enum Operator {
DeleteSurrounds,
Mark,
Jump { line: bool },
Indent,
Outdent,
}
#[derive(Default, Clone)]
@ -266,6 +268,8 @@ impl Operator {
Operator::Mark => "m",
Operator::Jump { line: true } => "'",
Operator::Jump { line: false } => "`",
Operator::Indent => ">",
Operator::Outdent => "<",
}
}