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

Add buffer directory searching

This commit is contained in:
wsdjeg 2018-04-18 21:30:22 +08:00
parent b362f23bec
commit 83bfe0e5e8

View File

@ -184,6 +184,13 @@ function! SpaceVim#mapping#space#init() abort
\ 'grep in all loaded buffers', 1)
call SpaceVim#mapping#space#def('nnoremap', ['s', 'B'], "call SpaceVim#plugins#flygrep#open({'input' : expand(\"<cword>\"), 'files':'@buffers'})",
\ 'grep cursor word in all loaded buffers', 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')})",
\ 'grep in arbitrary directory', 1)
call SpaceVim#mapping#space#def('nnoremap', ['s', 'D'], "call SpaceVim#plugins#flygrep#open({'input' :"
\ . " expand(\"<cword>\"), 'dir' : fnamemodify(expand('%'), ':p:h')})",
\ 'grep cursor word in arbitrary directory', 1)
" Searching in files in an arbitrary directory
call SpaceVim#mapping#space#def('nnoremap', ['s', 'f'], "call SpaceVim#plugins#flygrep#open({'input' :"
\ . " input(\"grep pattern:\"), 'dir' : input(\"arbitrary dir:\", '', 'dir')})",