diff options
author | Gokul Soumya | 2021-07-03 01:07:49 +0000 |
---|---|---|
committer | GitHub | 2021-07-03 01:07:49 +0000 |
commit | c68fe1f2a3a40c37969c1f5d18e3134320a0c773 (patch) | |
tree | 4c5c2ff317d90f2ba520135ad0d2726d9a6cb9b2 /book/src/keymap.md | |
parent | c5b2973739901f8cd4bc26f3cfc8232249eb7968 (diff) |
Add object selection (textobjects) (#385)
* Add textobjects for word
* Add textobjects for surround characters
* Apply clippy lints
* Remove ThisWordPrevBound in favor of PrevWordEnd
It's the same as PrevWordEnd except for taking the current char
into account, so use a "flag" to capture that usecase
* Add tests for PrevWordEnd movement
* Remove ThisWord* movements
They did not preserve anchor positions and were only used
for textobject boundary search anyway so replace them with
simple position finding functions
* Rewrite tests of word textobject
* Add tests for surround textobject
* Add textobject docs
* Refactor textobject word position functions
* Apply clippy lints on textobject
* Fix overflow error with textobjects
Diffstat (limited to 'book/src/keymap.md')
-rw-r--r-- | book/src/keymap.md | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/book/src/keymap.md b/book/src/keymap.md index 0265fe6d..6b7ccd11 100644 --- a/book/src/keymap.md +++ b/book/src/keymap.md @@ -150,7 +150,8 @@ Jumps to various locations. ## Match mode Enter this mode using `m` from normal mode. See the relavant section -in [Usage](./usage.md#surround) for an explanation about surround usage. +in [Usage](./usage.md) for an explanation about [surround](./usage.md#surround) +and [textobject](./usage.md#textobject) usage. | Key | Description | | ----- | ----------- | @@ -158,6 +159,8 @@ in [Usage](./usage.md#surround) for an explanation about surround usage. | `s` `<char>` | Surround current selection with `<char>` | | `r` `<from><to>` | Replace surround character `<from>` with `<to>` | | `d` `<char>` | Delete surround character `<char>` | +| `a` `<object>` | Select around textobject | +| `i` `<object>` | Select inside textobject | ## Object mode |