asterisk.vim provides improved * motions.
z star motions doesn't move your cursor.
Search selected text.
Default behavior, which sees ignorecase and not smartcase, is not intuitive.
It is handy for refactoring to keep cursor position while iterating over matches.
Add following line in your vimrc to enable this feature. let g:asterisk#keeppos = 1
Default: 0
NeoBundle 'haya14busa/vim-asterisk'
Plugin 'haya14busa/vim-asterisk'
Plug 'haya14busa/vim-asterisk'
git clone https://github.com/haya14busa/vim-asterisk ~/.vim/bundle/vim-asterisk
map * <Plug>(asterisk-*)
map # <Plug>(asterisk-#)
map g* <Plug>(asterisk-g*)
map g# <Plug>(asterisk-g#)
map z* <Plug>(asterisk-z*)
map gz* <Plug>(asterisk-gz*)
map z# <Plug>(asterisk-z#)
map gz# <Plug>(asterisk-gz#)
If you want to set "z" (stay) behavior as default
map * <Plug>(asterisk-z*)
map # <Plug>(asterisk-z#)
map g* <Plug>(asterisk-gz*)
map g# <Plug>(asterisk-gz#)
To enable keepCursor feature:
let g:asterisk#keeppos = 1
|vim-asterisk| uses the code from vim-visualstar for visual star feature.
- Author: thinca (https://github.com/thinca)
- Plugin: https://github.com/thinca/vim-visualstar
haya14busa (https://github.com/haya14busa)