mirror of
https://git.korhonen.cc/FunctionalHacker/dotfiles.git
synced 2024-11-04 18:00:20 +00:00
Make every FZF command use ripgrep
Signed-off-by: Marko Korhonen <marko.korhonen@reekynet.com>
This commit is contained in:
parent
5afa59e5d4
commit
6e1288c95c
@ -36,6 +36,14 @@ let g:fzf_layout = { 'window': 'call FloatingFZF()' }
|
||||
nmap <C-f> :Files<CR>
|
||||
nmap <C-g> :Rg<CR>
|
||||
|
||||
" Files command customization
|
||||
command! -bang -nargs=* Rg
|
||||
\ call fzf#vim#files(
|
||||
\ 'rg --files --hidden 2>/dev/null'.shellescape(<q-args>), 1,
|
||||
\ <bang>0 ? fzf#vim#with_preview('up:60%')
|
||||
\ : fzf#vim#with_preview('right:50%:hidden', '?'),
|
||||
\ <bang>0)
|
||||
|
||||
" Ripgrep command customization
|
||||
command! -bang -nargs=* Rg
|
||||
\ call fzf#vim#grep(
|
||||
|
@ -17,6 +17,13 @@ export GOPATH=~/.bin/go
|
||||
export FZF_DEFAULT_COMMAND='rg --files --hidden 2>/dev/null'
|
||||
export FZF_COMPLETION_TRIGGER='**'
|
||||
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
|
||||
export FZF_ALT_C_COMMAND='rg --hidden --files --null --sort path 2>/dev/null | xargs -0 dirname | uniq'
|
||||
_fzf_compgen_dir() {
|
||||
rg --hidden --files --null --sort path 2>/dev/null | xargs -0 dirname | uniq
|
||||
}
|
||||
_fzf_compgen_path() {
|
||||
rg --files --hidden 2>/dev/null
|
||||
}
|
||||
|
||||
# use lesspipe with less
|
||||
export LESSOPEN="|lesspipe.sh %s"
|
||||
|
@ -30,10 +30,6 @@ zplugin light zsh-users/zsh-completions
|
||||
zplugin ice wait'1' lucid as'completion'
|
||||
zplugin snippet https://gist.githubusercontent.com/RPigott/a3efdc08fa4d5fd7df38d091ab5e8532/raw/867ac1884d97d1bd1e5d4037d4eefdf4a004e72b/_swaymsg
|
||||
|
||||
# fzf completions
|
||||
zplugin ice wait'1' lucid as'completion'
|
||||
zplugin snippet /usr/share/fzf/completion.zsh
|
||||
|
||||
# dotdrop completion
|
||||
zplugin ice wait'1' lucid as'completion'
|
||||
zplugin snippet $DOTREPO/dotdrop/completion/_dotdrop-completion.zsh
|
||||
|
Loading…
Reference in New Issue
Block a user