1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 04:00:03 +08:00
SpaceVim/bundle/incsearch-easymotion.vim
2022-06-10 16:31:14 +08:00
..
autoload/incsearch feat(incsearch): update incsearch layer 2022-06-10 16:31:14 +08:00
plugin/incsearch feat(incsearch): update incsearch layer 2022-06-10 16:31:14 +08:00
README.md feat(incsearch): update incsearch layer 2022-06-10 16:31:14 +08:00

incsearch-easymotion.vim

Integration between haya14busa/incsearch.vim and easymotion/vim-easymotion

incsearch-easymotion.gif

Dependencies

Installtaion

Neobundle / Vundle / vim-plug

NeoBundle 'haya14busa/incsearch.vim'
Plugin 'haya14busa/incsearch.vim'
Plug 'haya14busa/incsearch.vim'

NeoBundle 'haya14busa/incsearch-easymotion.vim'
Plugin 'haya14busa/incsearch-easymotion.vim'
Plug 'haya14busa/incsearch-easymotion.vim'

pathogen

git clone https://github.com/haya14busa/incsearch.vim ~/.vim/bundle/incsearch.vim
git clone https://github.com/haya14busa/incsearch-easymotion.vim ~/.vim/bundle/incsearch-easymotion.vim

Usage

Give it a shot! 🔫 :call incsearch#call(incsearch#config#easymotion#make())

map z/ <Plug>(incsearch-easymotion-/)
map z? <Plug>(incsearch-easymotion-?)
map zg/ <Plug>(incsearch-easymotion-stay)

Advanced usage

incremental fuzzymotion

incsearch-fuzzy-easymotion.gif

" incsearch.vim x fuzzy x vim-easymotion

function! s:config_easyfuzzymotion(...) abort
  return extend(copy({
  \   'converters': [incsearch#config#fuzzy#converter()],
  \   'modules': [incsearch#config#easymotion#module()],
  \   'keymap': {"\<CR>": '<Over>(easymotion)'},
  \   'is_expr': 0,
  \   'is_stay': 1
  \ }), get(a:, 1, {}))
endfunction

noremap <silent><expr> <Space>/ incsearch#go(<SID>config_easyfuzzymotion())

API

  • incsearch#config#easymotion#module(): return easymotion module for incsearch.vim
    • It provide <Over>(easymotion) key to invoke easymotion feature from incsearch.vim
  • incsearch#config#easymotion#make: return default config