Add AutoIndent action and '=' vim operator (#21427)

Release Notes:

- vim: Added the `=` operator, for auto-indent

Co-authored-by: Conrad <conrad@zed.dev>
This commit is contained in:
Max Brunsfeld 2024-12-02 15:00:04 -08:00 committed by GitHub
parent f3140f54d8
commit 7c994cd4a5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 481 additions and 186 deletions

View file

@ -72,6 +72,7 @@ pub enum Operator {
Jump { line: bool },
Indent,
Outdent,
AutoIndent,
Rewrap,
Lowercase,
Uppercase,
@ -465,6 +466,7 @@ impl Operator {
Operator::Jump { line: true } => "'",
Operator::Jump { line: false } => "`",
Operator::Indent => ">",
Operator::AutoIndent => "eq",
Operator::Rewrap => "gq",
Operator::Outdent => "<",
Operator::Uppercase => "gU",
@ -510,6 +512,7 @@ impl Operator {
| Operator::Rewrap
| Operator::Indent
| Operator::Outdent
| Operator::AutoIndent
| Operator::Lowercase
| Operator::Uppercase
| Operator::Object { .. }