From af532147c97987d6170dc06a52aa3434ebf1b9d4 Mon Sep 17 00:00:00 2001 From: Pascal Kuthe Date: Tue, 6 Dec 2022 15:18:33 +0100 Subject: Add command/keybinding to jump between hunks (#4650) * add command and keybding to jump to next/prev hunk * add textobject for change * Update helix-vcs/src/diff.rs Co-authored-by: Michael Davis * select entire hunk instead of first char * fix selection range Co-authored-by: Michael Davis --- book/src/keymap.md | 4 ++++ book/src/usage.md | 1 + 2 files changed, 5 insertions(+) (limited to 'book/src') diff --git a/book/src/keymap.md b/book/src/keymap.md index c3c09f4c..139e8fdd 100644 --- a/book/src/keymap.md +++ b/book/src/keymap.md @@ -320,6 +320,10 @@ Mappings in the style of [vim-unimpaired](https://github.com/tpope/vim-unimpaire | `]T` | Go to previous test (**TS**) | `goto_prev_test` | | `]p` | Go to next paragraph | `goto_next_paragraph` | | `[p` | Go to previous paragraph | `goto_prev_paragraph` | +| `]g` | Go to next change | `goto_next_change` | +| `[g` | Go to previous change | `goto_prev_change` | +| `]G` | Go to first change | `goto_first_change` | +| `[G` | Go to last change | `goto_last_change` | | `[Space` | Add newline above | `add_newline_above` | | `]Space` | Add newline below | `add_newline_below` | diff --git a/book/src/usage.md b/book/src/usage.md index 646bf926..a6eb9ec1 100644 --- a/book/src/usage.md +++ b/book/src/usage.md @@ -143,6 +143,7 @@ though, we climb the syntax tree and then take the previous selection. So | `a` | Argument/parameter | | `o` | Comment | | `t` | Test | +| `g` | Change | > NOTE: `f`, `c`, etc need a tree-sitter grammar active for the current document and a special tree-sitter query file to work properly. [Only -- cgit v1.2.3-70-g09d2