chore(prog/nvim): remove grep op
This commit is contained in:
parent
7884493941
commit
187137fc00
1 changed files with 0 additions and 23 deletions
|
@ -1,23 +0,0 @@
|
||||||
nnoremap <leader>g :set operatorfunc=<SID>GrepOperator<cr>g@
|
|
||||||
vnoremap <leader>g :<c-u>call <SID>GrepOperator(visualmode())<cr>
|
|
||||||
|
|
||||||
nnoremap <leader>cj :cnext<cr>
|
|
||||||
nnoremap <leader>ck :cprev<cr>
|
|
||||||
|
|
||||||
function! s:GrepOperator(type)
|
|
||||||
let saved_unnamed_register = @@
|
|
||||||
|
|
||||||
if a:type ==# 'v'
|
|
||||||
exe "normal! `<v`>y"
|
|
||||||
elseif a:type ==# 'char'
|
|
||||||
exe "normal! `[v`]y"
|
|
||||||
else
|
|
||||||
return
|
|
||||||
endif
|
|
||||||
|
|
||||||
silent exe ":grep! -R " . shellescape(@@) . " ."
|
|
||||||
copen
|
|
||||||
|
|
||||||
let @@ = saved_unnamed_register
|
|
||||||
endfunction
|
|
||||||
|
|
Loading…
Reference in a new issue