Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/junegunn/vim-after-object
:point_right: Target text *after* the designated characters
https://github.com/junegunn/vim-after-object
Last synced: about 1 month ago
JSON representation
:point_right: Target text *after* the designated characters
- Host: GitHub
- URL: https://github.com/junegunn/vim-after-object
- Owner: junegunn
- Created: 2014-08-20T10:24:39.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2018-09-17T09:21:23.000Z (over 6 years ago)
- Last Synced: 2024-11-16T02:44:44.375Z (3 months ago)
- Language: Vim script
- Homepage:
- Size: 12.7 KB
- Stars: 115
- Watchers: 6
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
vim-after-object 
================Defines text objects to target text *after* the designated characters.
Installation
------------Using [vim-plug](https://github.com/junegunn/vim-plug):
```vim
Plug 'junegunn/vim-after-object'
```Setting up
----------vim-after-object does not define any mappings by default. You have to enable
mappings you want.```vim
autocmd VimEnter * call after_object#enable('=', ':', '-', '#', ' ')
```For each character in the argument list, a pair of mappings is defined; the
default mapping with `a`-prefix (mnemonic for *after*) and the one with
`aa`-prefix for backward search. The latter is only useful when the character
appears more than once in the line.To use different prefixes, pass an optional list to `after_object#enable`:
```vim
" ]= and [= instead of a= and aa=
autocmd VimEnter * call after_object#enable([']', '['], '=', ':')
```Usage
-----```ruby
# va= visual after =
# ca= change after =
# da= delete after =
# ya= yank after =
apple = 'juice'
```When the line contains multiple occurrences of the character, you can move the
visual selection forward by repeating `a=`, or backward with `aa=`. Both
mappings can be preceded by a count. Refer to the test cases for the details.