Skip to content

Commit

Permalink
iz/az textobjs leave the brackets behind
Browse files Browse the repository at this point in the history
  • Loading branch information
isovector committed Feb 17, 2022
1 parent e4d41f5 commit 7b3514f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,13 @@ for available bindings, or slap your `<LocalLeader>` while in insert mode.

## Text Objects

Use the `iz`/`az` text objects to operate on text between `` and ``.
Use the `iz`/`az` text objects to operate on text between `` and ``. Somewhat
surprisingly for i/a text objects, `iz` targets the _spaces_ between these
brackets, and `az` targets the spaces. Neither textobj targets the brackets
themselves.

Also `ii`/`ai` will operate on `` and ``.
Also `ii`/`ai` will operate on `` and ``, but in the way you'd expect
text objects to behave.

`ih`/`ah` will operate on `{!` and `!}`.

Expand Down
5 changes: 4 additions & 1 deletion ftplugin/agda.vim
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ runtime agda-matchpairs.vim
call textobj#user#plugin('cornelis', {
\ 'zbrackets': {
\ 'pattern': ['', ''],
\ 'select-a': 'az',
\ 'select-i': 'az',
\ },
\ 'zspacebrackets': {
\ 'pattern': ['', ''],
\ 'select-i': 'iz',
\ },
\ 'ibrackets': {
Expand Down

0 comments on commit 7b3514f

Please sign in to comment.