1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-04-14 15:19:12 +08:00

fix(telescope): fix telescope layer key binding

This commit is contained in:
wsdjeg 2022-05-21 22:25:59 +08:00
parent 0f885b6e17
commit 898fbc8c37
2 changed files with 6 additions and 7 deletions

View File

@ -57,8 +57,7 @@ let s:lnum = expand('<slnum>') + 2
function! SpaceVim#layers#telescope#config() abort
let lnum = expand('<slnum>') + s:lnum - 1
call SpaceVim#mapping#space#def('nnoremap', ['?'], 'call call('
\ . string(s:_function('s:get_menu')) . ', ["CustomKeyMaps", "[SPC]"])',
call SpaceVim#mapping#space#def('nnoremap', ['?'], 'Telescope menu menu=CustomKeyMaps default_text=[SPC]',
\ ['show-mappings',
\ [
\ 'SPC ? is to show mappings',
@ -285,9 +284,9 @@ function! s:defind_fuzzy_finder() abort
\ ]
\ ]
nnoremap <silent> <Leader>f<Space> :CtrlPMenu CustomKeyMaps<CR>
nnoremap <silent> <Leader>f<Space> :Telescope menu menu=CustomKeyMaps<CR>
let lnum = expand('<slnum>') + s:unite_lnum - 4
let g:_spacevim_mappings.f['[SPC]'] = ['CtrlPMenu CustomKeyMaps',
let g:_spacevim_mappings.f['[SPC]'] = ['Telescope menu menu=CustomKeyMaps',
\ 'fuzzy find custom key bindings',
\ [
\ '[Leader f SPC] is to fuzzy find custom key bindings',
@ -296,9 +295,9 @@ function! s:defind_fuzzy_finder() abort
\ ]
\ ]
nnoremap <silent> <Leader>fp :<C-u>CtrlPMenu AddedPlugins<CR>
nnoremap <silent> <Leader>fp :<C-u>Telescope menu menu=AddedPlugins<CR>
let lnum = expand('<slnum>') + s:unite_lnum - 4
let g:_spacevim_mappings.f.p = ['CtrlPMenu AddedPlugins',
let g:_spacevim_mappings.f.p = ['Telescope menu menu=AddedPlugins',
\ 'fuzzy find vim packages',
\ [
\ '[Leader f p] is to fuzzy find vim packages installed in SpaceVim',

View File

@ -19,7 +19,7 @@ local function show_menu(opts)
opts = opts or {}
local menu = opts.menu or ''
pickers.new(opts, {
prompt_title = "Menu",
prompt_title = "Menu:" .. menu,
finder = finders.new_table {
results = prepare_menu(menu),
entry_maker = function(entry)