1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-24 05:20:04 +08:00

Fuzzy find key bindings (#1521)

This commit is contained in:
Wang Shidong 2018-03-20 22:48:54 +08:00 committed by GitHub
parent 429791a949
commit a24b7e82e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -44,7 +44,7 @@ function! s:defind_fuzzy_finder() abort
nnoremap <silent> <Leader>fe
\ :<C-u>Denite register<CR>
let lnum = expand('<slnum>') + s:unite_lnum - 4
let g:_spacevim_mappings.f.r = ['Denite register',
let g:_spacevim_mappings.f.e = ['Denite register',
\ 'fuzzy find registers',
\ [
\ '[Leader f r ] is to resume unite window',
@ -117,5 +117,8 @@ function! s:defind_fuzzy_finder() abort
\ 'Definition: ' . s:file . ':' . lnum,
\ ]
\ ]
nnoremap <silent> <Leader>f<Space> :Denite menu:CustomKeyMaps<CR>
let g:_spacevim_mappings.f['[SPC]'] = ['Denite menu:CustomKeyMaps',
\ 'fuzzy find custom key bindings']
endfunction
" vim:set et sw=2 cc=80:

View File

@ -102,7 +102,7 @@ function! s:start_parser(key, dict) " {{{
endif
let mapd.display = s:format_displaystring(mapd.rhs)
let mapd.lhs = substitute(mapd.lhs, key, "", "")
let mapd.lhs = substitute(mapd.lhs, "<Space>", " ", "g")
" let mapd.lhs = substitute(mapd.lhs, "<Space>", " ", "g")
let mapd.lhs = substitute(mapd.lhs, "<Tab>", "<C-I>", "g")
let mapd.rhs = substitute(mapd.rhs, "<SID>", "<SNR>".mapd['sid']."_", "g")
if mapd.lhs != '' && mapd.display !~# 'LeaderGuide.*'