vim: Add more diff stuff (#17456)

Release Notes:

- vim: Added `:diff` and `:revert` (that work with `'<,'>`) to open the
selected diff and revert it.
- vim: Added `d o` to open the diff and `d p` to revert (spiritually
similar to vim's do/dp, though obviously not the same)
- vim: Added `ctrl-p` and `ctrl-n` to summon the autocomplete menu in
insert mode.
This commit is contained in:
Conrad Irwin 2024-09-05 20:35:04 -06:00 committed by GitHub
parent 5f2a5ffadd
commit 6af5fdd1c2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View file

@ -586,6 +586,8 @@ fn generate_commands(_: &AppContext) -> Vec<VimCommand> {
VimCommand::new(("lp", "revious"), editor::actions::GoToPrevDiagnostic).count(),
VimCommand::new(("lN", "ext"), editor::actions::GoToPrevDiagnostic).count(),
VimCommand::new(("j", "oin"), JoinLines).range(),
VimCommand::new(("dif", "fupdate"), editor::actions::ToggleHunkDiff).range(),
VimCommand::new(("rev", "ert"), editor::actions::RevertSelectedHunks).range(),
VimCommand::new(("d", "elete"), VisualDeleteLine).range(),
VimCommand::new(("y", "ank"), VisualYankLine).range(),
VimCommand::new(("sor", "t"), SortLinesCaseSensitive).range(),