Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion bin/bundler-search
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,8 @@
# 2. Which gem names to search (defaults to all gems)

pattern="$1"; shift
ag "$pattern" $(bundle show --paths "$@")
if command -v rg &>/dev/null; then
rg "$pattern" $(bundle show --paths "$@")
else
ag "$pattern" $(bundle show --paths "$@")
fi
11 changes: 10 additions & 1 deletion vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,17 @@ set list listchars=tab:»·,trail:·,nbsp:·
" Use one space, not two, after punctuation.
set nojoinspaces

" Use ripgrep https://github.com/BurntSushi/ripgrep
if executable('rg')
" Use Rg over Grep
set grepprg=rg\ --vimgrep\ --no-heading\ --smart-case

" Use rg in fzf for listing files. Lightning fast and respects .gitignore
let $FZF_DEFAULT_COMMAND = 'rg --files --hidden --follow --glob "!.git/*"'

nnoremap \ :Rg<SPACE>
" Use The Silver Searcher https://github.com/ggreer/the_silver_searcher
if executable('ag')
elseif executable('ag')
" Use Ag over Grep
set grepprg=ag\ --nogroup\ --nocolor

Expand Down