mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-24 02:20:03 +08:00
commit
2eb48ec0b3
@ -199,9 +199,12 @@ function! SpaceVim#mapping#space#init() abort
|
|||||||
\ . " expand(\"<cword>\"), 'dir' : input(\"arbitrary dir:\", '', 'dir')})",
|
\ . " expand(\"<cword>\"), 'dir' : input(\"arbitrary dir:\", '', 'dir')})",
|
||||||
\ 'grep cursor word in arbitrary directory', 1)
|
\ 'grep cursor word in arbitrary directory', 1)
|
||||||
" Searching in project
|
" Searching in project
|
||||||
call SpaceVim#mapping#space#def('nnoremap', ['s', 'p'], "call SpaceVim#plugins#flygrep#open({'input' : input(\"grep pattern:\")})",
|
call SpaceVim#mapping#space#def('nnoremap', ['s', 'p'],
|
||||||
|
\ 'call SpaceVim#plugins#flygrep#open(' .
|
||||||
|
\ "{'input' : input(\"grep pattern:\"), 'dir' : get(b:, \"rootDir\", getcwd())})",
|
||||||
\ 'grep in project', 1)
|
\ 'grep in project', 1)
|
||||||
call SpaceVim#mapping#space#def('nnoremap', ['s', 'P'], "call SpaceVim#plugins#flygrep#open({'input' : expand(\"<cword>\")})",
|
call SpaceVim#mapping#space#def('nnoremap', ['s', 'P'],
|
||||||
|
\ "call SpaceVim#plugins#flygrep#open({'input' : expand(\"<cword>\"), 'dir' : get(b:, \"rootDir\", getcwd())})",
|
||||||
\ 'grep cursor word in project', 1)
|
\ 'grep cursor word in project', 1)
|
||||||
" Searching background
|
" Searching background
|
||||||
call SpaceVim#mapping#space#def('nnoremap', ['s', 'j'],
|
call SpaceVim#mapping#space#def('nnoremap', ['s', 'j'],
|
||||||
|
@ -172,8 +172,8 @@ function! s:close_buffer() abort
|
|||||||
if s:grep_timer_id != 0
|
if s:grep_timer_id != 0
|
||||||
call timer_stop(s:grep_timer_id)
|
call timer_stop(s:grep_timer_id)
|
||||||
endif
|
endif
|
||||||
pclose
|
noautocmd pclose
|
||||||
q
|
noautocmd q
|
||||||
endfunction
|
endfunction
|
||||||
let s:MPT._onclose = function('s:close_buffer')
|
let s:MPT._onclose = function('s:close_buffer')
|
||||||
" }}}
|
" }}}
|
||||||
@ -415,7 +415,7 @@ function! SpaceVim#plugins#flygrep#open(agrv) abort
|
|||||||
let s:mode = ''
|
let s:mode = ''
|
||||||
" set default handle func: s:flygrep
|
" set default handle func: s:flygrep
|
||||||
let s:MPT._handle_fly = function('s:flygrep')
|
let s:MPT._handle_fly = function('s:flygrep')
|
||||||
rightbelow split __flygrep__
|
noautocmd rightbelow split __flygrep__
|
||||||
let s:flygrep_buffer_id = bufnr('%')
|
let s:flygrep_buffer_id = bufnr('%')
|
||||||
setlocal buftype=nofile bufhidden=wipe nobuflisted nolist noswapfile nowrap cursorline nospell nonu norelativenumber
|
setlocal buftype=nofile bufhidden=wipe nobuflisted nolist noswapfile nowrap cursorline nospell nonu norelativenumber
|
||||||
let save_tve = &t_ve
|
let save_tve = &t_ve
|
||||||
|
Loading…
Reference in New Issue
Block a user