aboutsummaryrefslogtreecommitdiff
path: root/book/src/usage.md
diff options
context:
space:
mode:
authorNathan Vegdahl2021-07-06 03:27:49 +0000
committerNathan Vegdahl2021-07-06 03:27:49 +0000
commit85d5b399de70ff075a455ce2858549d1ed012fe3 (patch)
tree4824fcb47f39551d3b31a62931adaf0ee406c02b /book/src/usage.md
parent6e15c9b8745e9708ee5271c8701d41a8393cb038 (diff)
parent3c31f501164080998975883eb6f93c49bd8d3efb (diff)
Merge branch 'master' into great_line_ending_and_cursor_range_cleanup
Diffstat (limited to 'book/src/usage.md')
-rw-r--r--book/src/usage.md16
1 files changed, 16 insertions, 0 deletions
diff --git a/book/src/usage.md b/book/src/usage.md
index e6bd60e2..0458071a 100644
--- a/book/src/usage.md
+++ b/book/src/usage.md
@@ -24,3 +24,19 @@ It can also act on multiple seletions (yay!). For example, to change every occur
- `mr([` to replace the parens with square brackets
Multiple characters are currently not supported, but planned.
+
+## Textobjects
+
+Currently supported: `word`, `surround`.
+
+![textobject-demo](https://user-images.githubusercontent.com/23398472/124231131-81a4bb00-db2d-11eb-9d10-8e577ca7b177.gif)
+
+- `ma` - Select around the object (`va` in vim, `<alt-a>` in kakoune)
+- `mi` - Select inside the object (`vi` in vim, `<alt-i>` in kakoune)
+
+| Key after `mi` or `ma` | Textobject selected |
+| --- | --- |
+| `w` | Word |
+| `(`, `[`, `'`, etc | Specified surround pairs |
+
+Textobjects based on treesitter, like `function`, `class`, etc are planned.