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