Flattery will lead you everywhere.
Flattery provides targets for
t searches, either as a conveniency
fb searching for
), as for text-objects] or creating new target types.
All mappings are configurable.
tl 2tl 3tl fd fu 2fu fgr fr fh fgb fb | | | | | | | | | | | let snake_case_ident = foo.camelCaseMember['bar'] . autoload#func(baz) | | | | <Cursor> fe 2fd fz
Jump to the next closing angle bracket, like
Jump to the next closing paren, like
Jump to the next closing curly brace, like
Jump to the next closing square bracket, like
Jump to the next uppercase letter.
Jump to the next word limit, ie. the char just after an "alnum-word". An alnum-word is defined here as a series of alphanumerics, irrespective of the 'iskeyword' or 'isident' options.
Jump to the next alnum-word. Useful to move around in, for instance, snake-case identifiers like 'did_load_filetypes'.
Jump to the char just before end-of-line.
Jump to the next dot char
Jump to the next equal sign
Jump to the next hash char
Jump to the next pipe char
Jump to the next slash char
Parens, curly braces and brackets (angle & square) usually work in pairs: by default, Flattery jumps forward to the closing one, and backward to the opening one. This is entirely configurable; it can be reversed, or set to always jump to the opening or closing element.
In addition to targets, the following mappings are available by default:
fvmaps to builtin
f(so you can hit
fvato search an
fgswaps the opening/closing element for pairs (parens and brackets)
fjrepeats the last search
fxgoes one char farther, eg.
fxbjumps just after a closing paren (only works for flattery targets)
Check the doc for the full list of settings.
"Ain't Gonna Need It"
It is trivial to replace the simplest targets with maps in your .vimrc,
nnoremap fb f)], and this is how it was initially done by yours truly.
If this is all you will ever need (eg. no new targets, no pair handling),
please do so.
Use your favorite method:
- Pathogen - git clone https://github.com/fcpg/vim-flattery ~/.vim/bundle/vim-flattery
- NeoBundle - NeoBundle 'fcpg/vim-flattery'
- Vundle - Plugin 'fcpg/vim-flattery'
- Plug - Plug 'fcpg/vim-flattery'
- manual - copy all files into your ~/.vim directory