Add Rag command for fzf
This commit is contained in:
parent
8ca26b851d
commit
4eca702e94
5
vimrc
5
vimrc
@ -269,7 +269,12 @@ let g:ctrlp_match_func = { 'match': 'cpsm#CtrlPMatch' }
|
|||||||
" --color: Search color options
|
" --color: Search color options
|
||||||
command! -bang -nargs=* Find call fzf#vim#grep('rg --column --line-number --no-heading --fixed-strings --ignore-case --no-ignore --hidden --follow --glob "!.git/*" --color "always" '.shellescape(<q-args>), 1, <bang>0)
|
command! -bang -nargs=* Find call fzf#vim#grep('rg --column --line-number --no-heading --fixed-strings --ignore-case --no-ignore --hidden --follow --glob "!.git/*" --color "always" '.shellescape(<q-args>), 1, <bang>0)
|
||||||
|
|
||||||
|
function! s:with_git_root()
|
||||||
|
let root = systemlist('git rev-parse --show-toplevel')[0]
|
||||||
|
return v:shell_error ? {} : {'dir': root}
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
command! -bang -nargs=* Rag call fzf#vim#ag_raw(<q-args>, s:with_git_root())
|
||||||
|
|
||||||
" ==== conque ====
|
" ==== conque ====
|
||||||
" command aliases
|
" command aliases
|
||||||
|
Loading…
Reference in New Issue
Block a user