Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
junegunn committed Aug 21, 2014
1 parent cc8e80a commit 00b01f3
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,18 @@ You have to enable mappings that you want.

```vim
" Define 'after text objects' on VimEnter
autocmd VimEnter * call after_object#enable('=', '-', ':', '#', ' ')
autocmd VimEnter * call after_object#enable('=', ':', '-', '#', ' ')
```

The above example will define mappings for `a=`, `aa=`, `a:`, `aa:`,
and so forth. (`a` prefix is for forward motion and `aa` is for backward)

To define mappings with different prefixes other than `a` and `aa`, you can
pass an optional list containing forward and backward prefix to
`after_object#enable` call as follows:

```vim
autocmd VimEnter * call after_object#enable([']', '['], '=', ':')
```

Usage
Expand All @@ -37,12 +48,3 @@ apple = 'juice'
When the line contains multiple occurrences of the characters, you can forward
the visual selection by repeating `a=`, or move backward with `aa=`. Both
mappings can be preceded by a count. Refer to the test cases for the details.

To define mappings with different prefixes other than `a` and `aa`, you can
pass an optional list containing forward prefix and backward prefix to
`after_object#enable` call as follows:

```vim
autocmd VimEnter * call after_object#enable([']', '['], '=', ':')
```

0 comments on commit 00b01f3

Please sign in to comment.