Add Rag command for fzf

This commit is contained in:
Julian Ospald 2018-08-16 00:19:38 +08:00
parent 8ca26b851d
commit 4eca702e94
No known key found for this signature in database
GPG Key ID: 511B62C09D50CD28

5
vimrc
View File

@ -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