我安装了这4个插件: incsearch incsearch-fuzzy vim-easymotion incsearch-easymotion 但是找不到让它们全部工作的方法,在我的ubuntu 16.04系统中,我不能使用incsearch-fuzzy插件的函数进行模糊搜索,你能帮我解决一下如何在我安装这些4时设置vimrc插件?
关于这4个插件的vimrc设置如下:
"111111incsearch插件设置
""""""""""start of incsearch"""""""""
map / (incsearch-forward)
map ? (incsearch-backward)
map g/ (incsearch-stay)
set hlsearch
let g:incsearch#auto_nohlsearch = 1
map n (incsearch-nohl-n)
map N (incsearch-nohl-N)
map * (incsearch-nohl-)
map # (incsearch-nohl-#)
map g (incsearch-nohl-g*)
map g# (incsearch-nohl-g#)
function! s:noregexp(pattern) abort
return '\V' . escape(a:pattern, '\')
endfunction
function! s:config() abort
return {'converters': [function('s:noregexp')]}
endfunction
noremap z/ incsearch#go(config())
""""""""""end of incsearch""""""""""
"222222incsearch-fuzzy插件设置
"""""""""start of incsearch-fuzzy"""""""""
"fuzzy
map z/ (incsearch-fuzzy-/)
map z? (incsearch-fuzzy-?)
map zg/ (incsearch-fuzzy-stay)
fuzzyspell
map z/ (incsearch-fuzzyspell-/)
map z? (incsearch-fuzzyspell-?)
map zg/ (incsearch-fuzzyspell-stay)
"Use both fuzzy & fuzzyspell feature
function! s:config_fuzzyall(...) abort
return extend(copy({
\ 'converters': [
\ incsearch#config#fuzzy#converter(),
\ incsearch#config#fuzzyspell#converter()
\ ],
\ }), get(a:, 1, {}))
endfunction
noremap z/ incsearch#go(config_fuzzyall())
noremap z? incsearch#go(config_fuzzyall({'command': '?'}))
noremap zg? incsearch#go(config_fuzzyall({'is_stay': 1}))
"""""""""end of incsearch-fuzzy"""""""""
"333333incsearch-easymotion插件的设置
map z/ (incsearch-easymotion-/)
map z? (incsearch-easymotion-?)
map zg/ (incsearch-easymotion-stay)
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': {"": '(easymotion)'},
\ 'is_expr': 0,
\ 'is_stay': 1
\ }), get(a:, 1, {}))
endfunction
noremap / incsearch#go(config_easyfuzzymotion())
"下面是easymotion插件的相关设置
""""""""""""""""""start of easymotion""""""""""""""""""
"下面这句暂时不确定用意
let g:EasyMotion_do_mapping = 0 " Disable default mappings
"三键到任意地方
nmap s (easymotion-overwin-f)
"四键到任意地方
"nmap s (easymotion-overwin-f2)
"设置大小写不敏感
let g:EasyMotion_smartcase = 1
" JK motions: Line motions
map j (easymotion-j)
map k (easymotion-k)
"move to line
map l (easymotion-bd-jk)
nmap l (easymotion-overwin-line)
"下面设置fuzzsearch,这个有点叼,结合incsearch,incsearch-fuzzy,easymotion,incsearch-easymotion四个插件
" You can use other keymappings like instead of if you want to
" use these mappings as default search and somtimes want to move cursor with
" EasyMotion.
function! s:incsearch_config(...) abort
return incsearch#util#deepextend(deepcopy({
\ 'modules': [incsearch#config#easymotion#module({'overwin': 1})],
\ 'keymap': {
\ "": '(easymotion)'
\ },
\ 'is_expr': 0
\ }), get(a:, 1, {}))
endfunction
noremap / incsearch#go(incsearch_config())
noremap ? incsearch#go(incsearch_config({'command': '?'}))
noremap g/ incsearch#go(incsearch_config({'is_stay': 1}))
""""""""""""""""""end of easymotion""""""""""""""""""