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

feat(mapping): add help description for SPC s b

This commit is contained in:
wsdjeg 2022-01-30 20:07:10 +08:00
parent 43187df062
commit 91ad066ced

View File

@ -415,8 +415,21 @@ function! SpaceVim#mapping#space#init() abort
\ ]
\ , 1)
" Searching in all loaded buffers
call SpaceVim#mapping#space#def('nnoremap', ['s', 'b'], "call SpaceVim#plugins#flygrep#open({'input' : input(\"grep pattern:\"), 'files':'@buffers'})",
\ 'grep-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" : input("grep pattern:"), "files": "@buffers"}'
\ . ')',
\ ['grep-in-all-buffers',
\ [
\ 'SPC s b will search text 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)
call SpaceVim#mapping#space#def('nnoremap', ['s', 'B'], "call SpaceVim#plugins#flygrep#open({'input' : expand(\"<cword>\"), 'files':'@buffers'})",
\ 'grep-cword-in-all-buffers', 1)
" Searching in buffer directory