mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-30 22:34:13 +00:00
Vim smorgasbord (#12222)
Release Notes: - vim: Added `]d/[d` for go to prev/next diagnostic - vim: Added `]c/[c` to go to prev/next git change (`:diff` and `:revert` show the diff and revert it) - vim: Added `g cmd-d` for go to implementation
This commit is contained in:
parent
ec4703a8d5
commit
656edc4b2e
2 changed files with 18 additions and 5 deletions
|
@ -155,6 +155,7 @@
|
||||||
"g shift-t": "pane::ActivatePrevItem",
|
"g shift-t": "pane::ActivatePrevItem",
|
||||||
"g d": "editor::GoToDefinition",
|
"g d": "editor::GoToDefinition",
|
||||||
"g shift-d": "editor::GoToTypeDefinition",
|
"g shift-d": "editor::GoToTypeDefinition",
|
||||||
|
"g cmd-d": "editor::GoToImplementation",
|
||||||
"g x": "editor::OpenUrl",
|
"g x": "editor::OpenUrl",
|
||||||
"g n": "vim::SelectNextMatch",
|
"g n": "vim::SelectNextMatch",
|
||||||
"g shift-n": "vim::SelectPreviousMatch",
|
"g shift-n": "vim::SelectPreviousMatch",
|
||||||
|
@ -384,7 +385,11 @@
|
||||||
"ctrl-pageup": "pane::ActivatePrevItem",
|
"ctrl-pageup": "pane::ActivatePrevItem",
|
||||||
// tree-sitter related commands
|
// tree-sitter related commands
|
||||||
"[ x": "editor::SelectLargerSyntaxNode",
|
"[ x": "editor::SelectLargerSyntaxNode",
|
||||||
"] x": "editor::SelectSmallerSyntaxNode"
|
"] x": "editor::SelectSmallerSyntaxNode",
|
||||||
|
"] d": "editor::GoToDiagnostic",
|
||||||
|
"[ d": "editor::GoToPrevDiagnostic",
|
||||||
|
"] c": "editor::GoToHunk",
|
||||||
|
"[ c": "editor::GoToPrevHunk"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,6 +18,7 @@ Vim mode has several "core Zed" key bindings, that will help you make the most o
|
||||||
# Language server
|
# Language server
|
||||||
g d Go to definition
|
g d Go to definition
|
||||||
g D Go to type definition
|
g D Go to type definition
|
||||||
|
g cmd-d Go to implementation
|
||||||
c d Rename (change definition)
|
c d Rename (change definition)
|
||||||
g A Go to All references to the current word
|
g A Go to All references to the current word
|
||||||
|
|
||||||
|
@ -29,6 +30,10 @@ g [ Go to previous diagnostic
|
||||||
g h Show inline error (hover)
|
g h Show inline error (hover)
|
||||||
g . Open the code actions menu
|
g . Open the code actions menu
|
||||||
|
|
||||||
|
# Git
|
||||||
|
] c Go to previous git change
|
||||||
|
[ c Go to next git change
|
||||||
|
|
||||||
# Treesitter
|
# Treesitter
|
||||||
] x Select a smaller syntax node
|
] x Select a smaller syntax node
|
||||||
[ x Select a larger syntax node
|
[ x Select a larger syntax node
|
||||||
|
@ -190,6 +195,9 @@ Currently supported vim-specific commands:
|
||||||
As any Zed command is available, you may find that it's helpful to remember mnemonics that run the correct command. For example:
|
As any Zed command is available, you may find that it's helpful to remember mnemonics that run the correct command. For example:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
:diff Toggle Hunk [Diff]
|
||||||
|
:diffs Toggle all Hunk [Diffs]
|
||||||
|
:revert Revert Selected Hunks
|
||||||
:cpp [C]o[p]y [P]ath to file
|
:cpp [C]o[p]y [P]ath to file
|
||||||
:crp [C]opy [r]elative [P]ath
|
:crp [C]opy [r]elative [P]ath
|
||||||
:reveal [Reveal] in finder
|
:reveal [Reveal] in finder
|
||||||
|
|
Loading…
Reference in a new issue