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

feat(mapping): add help guide for SPC s B

This commit is contained in:
wsdjeg 2022-01-30 20:39:47 +08:00
parent 91ad066ced
commit 33e6754005

View File

@ -430,8 +430,20 @@ function! SpaceVim#mapping#space#init() abort
\ ]
\ , 1)
call SpaceVim#mapping#space#def('nnoremap', ['s', 'B'], "call SpaceVim#plugins#flygrep#open({'input' : expand(\"<cword>\"), 'files':'@buffers'})",
\ 'grep-cword-in-all-buffers', 1)
let s:lnum = expand('<slnum>') + s:funcbeginline
call SpaceVim#mapping#space#def('nnoremap', ['s', 'B'],
\ 'call SpaceVim#plugins#flygrep#open('
\ . '{"input" : expand("<cword>"), "files": "@buffers"}'
\ . ')',
\ ['grep-cword-in-all-buffers',
\ [
\ 'SPC s B will search cursor word in all loaded buffers, an input promot will be opened.',
\ 'The default searching tool is based on search_tools option',
\ '',
\ 'Definition: ' . s:file . ':' . s:lnum,
\ ]
\ ]
\ , 1)
" Searching in buffer directory
call SpaceVim#mapping#space#def('nnoremap', ['s', 'd'], "call SpaceVim#plugins#flygrep#open({'input' :"
\ . " input(\"grep pattern:\"), 'dir' : fnamemodify(expand('%'), ':p:h')})",