Improve vim ripgrep
This commit is contained in:
parent
03dcea5411
commit
83285f1181
1 changed files with 6 additions and 8 deletions
|
@ -32,14 +32,12 @@ endfunction
|
|||
" Looks
|
||||
"let $FZF_DEFAULT_OPTS=' --color=dark --color=fg:15,bg:-1,hl:1,fg+:#ffffff,bg+:0,hl+:1 --color=info:0,prompt:0,pointer:12,marker:4,spinner:11,header:-1 --layout=reverse --margin=1,4'
|
||||
|
||||
" ripgrep custom settings
|
||||
command! -bang -nargs=* Rg
|
||||
\ call fzf#vim#grep('rg --column --line-number --no-heading --color=always --smart-case '
|
||||
\ . (len(<q-args>) > 0 ? <q-args> : '""'), 0,
|
||||
\ fzf#vim#with_preview({'options': ['--delimiter=:', '--nth=2..', '--layout=reverse', '--info=inline']}), <bang>0)
|
||||
|
||||
" Keybinds
|
||||
nmap <C-f> :Files<CR>
|
||||
nmap <C-g> :Rg<CR>
|
||||
|
||||
" Ripgrep command customization
|
||||
command! -bang -nargs=* Rg
|
||||
\ call fzf#vim#grep(
|
||||
\ 'rg --column --hidden --line-number --no-heading --color=always --smart-case '.shellescape(<q-args>), 1,
|
||||
\ <bang>0 ? fzf#vim#with_preview('up:60%')
|
||||
\ : fzf#vim#with_preview('right:50%:hidden', '?'),
|
||||
\ <bang>0)
|
||||
|
|
Loading…
Reference in a new issue