aboutsummaryrefslogtreecommitdiff
path: root/book
diff options
context:
space:
mode:
authorDaniel S Poulin2022-03-06 05:24:24 +0000
committerGitHub2022-03-06 05:24:24 +0000
commit9bfb0caf1b4bafdac8eb964f38f7820740056fff (patch)
treea2e8120456a2b3d3acb43f881c9499e71eb37fac /book
parent7633c5acd30258fc9caca926bfaa264d07d508ec (diff)
Add comment textobject for surround selection and navigation (#1605)
Diffstat (limited to 'book')
-rw-r--r--book/src/guides/textobject.md2
-rw-r--r--book/src/keymap.md2
-rw-r--r--book/src/usage.md1
3 files changed, 5 insertions, 0 deletions
diff --git a/book/src/guides/textobject.md b/book/src/guides/textobject.md
index 7200a514..cccd4bbf 100644
--- a/book/src/guides/textobject.md
+++ b/book/src/guides/textobject.md
@@ -21,6 +21,8 @@ The following [captures][tree-sitter-captures] are recognized:
| `class.inside` |
| `class.around` |
| `parameter.inside` |
+| `comment.inside` |
+| `comment.around` |
[Example query files][textobject-examples] can be found in the helix GitHub repository.
diff --git a/book/src/keymap.md b/book/src/keymap.md
index 5de4edf9..2549fbaf 100644
--- a/book/src/keymap.md
+++ b/book/src/keymap.md
@@ -270,6 +270,8 @@ Mappings in the style of [vim-unimpaired](https://github.com/tpope/vim-unimpaire
| `[c` | Go to previous class (**TS**) | `goto_prev_class` |
| `]p` | Go to next parameter (**TS**) | `goto_next_parameter` |
| `[p` | Go to previous parameter (**TS**) | `goto_prev_parameter` |
+| `]o` | Go to next comment (**TS**) | `goto_next_comment` |
+| `[o` | Go to previous comment (**TS**) | `goto_prev_comment` |
| `[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 039628bf..9ae1eac5 100644
--- a/book/src/usage.md
+++ b/book/src/usage.md
@@ -69,6 +69,7 @@ Currently supported: `word`, `surround`, `function`, `class`, `parameter`.
| `f` | Function |
| `c` | Class |
| `p` | Parameter |
+| `o` | Comment |
> 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