1
0
forked from extern/nix-config

Switch from ag (the_silver_searcher) to rg (ripgrep)

This commit is contained in:
Donovan Glover 2017-12-31 22:40:14 -05:00
parent 55abdf0757
commit 0ef785bc4f
No known key found for this signature in database
GPG Key ID: 8FC5F7D90A5D8F4D
7 changed files with 8 additions and 8 deletions

View File

@ -19,4 +19,4 @@
##################################################################################
# See: https://unix.stackexchange.com/questions/138425/
i3-msg workspace $(($(i3-msg -t get_workspaces | tr , '\n' | ag '"num":' | cut -d : -f 2 | sort -rn | head -1) + 1))
i3-msg workspace $(($(i3-msg -t get_workspaces | tr , '\n' | rg '"num":' | cut -d : -f 2 | sort -rn | head -1) + 1))

View File

@ -28,7 +28,7 @@ source ~/.vim/keybindings.vim
let g:ale_lint_on_text_changed = 'never' " Do not lint while typing
let g:ale_lint_on_insert_leave = 1 " Only lint after leaving insert mode
let g:ackprg = 'ag --vimgrep' " Use ag instead of ack / grep
let g:ackprg = 'rg --vimgrep' " Use rg instead of ag / ack / grep
let g:plug_window = 'rightbelow topleft new' " Show vim-plug above instead of to the left
let g:vimfiler_as_default_explorer = 1 " Replace netrw with vimfiler as the default FileEx
let g:indentLine_enabled = 0 " Disable indent lines by default

View File

@ -76,7 +76,7 @@ alias compare="grep -nFxvf" # Usage: compare <file1> <file2>
alias dog="pygmentize -g"
# Easily show all of the todos in a given project
alias todo="ag TODO"
alias todo="rg TODO"
# Use exa as a drop-in replacement for "tree" (faster, more colors, etc.)
alias tree="exa --long --tree"

View File

@ -87,7 +87,7 @@ function ss() {
# Automatically open the readme in any repository
function readme() {
local readme=`ls | ag README`
local readme=`ls | rg README`
if [[ $readme ]]; then
nvim $readme
else

View File

@ -22,8 +22,8 @@ export VISUAL="vim"
export EDITOR="vim"
export BROWSER="inox"
# Use ag instead of grep for fzf (much faster)
export FZF_DEFAULT_COMMAND='ag -l -g ""'
# Use rg instead of ag / ack / grep for fzf (much faster)
export FZF_DEFAULT_COMMAND='rg --files --no-ignore --hidden --follow --glob "!.git/*"'
# Required to make gpg-agent work in cases like git commit
export GPG_TTY=$(tty)

View File

@ -66,7 +66,7 @@ Note that you should *never* give a file or directory more permissions than need
### Searching Through Files
- Search all files in a directory (and all subdirectories) for a given string: `grep -inr <search_term>` **OR** `g <search_term>`
- Search all files in a directory (including subdirectories) for a given string and ignore dotfiles: `ag <search_term>`
- Search all files in a directory (including subdirectories) for a given string and ignore dotfiles: `rg <search_term>`
### System Commands

View File

@ -61,8 +61,8 @@ i npm # Install npm, a package manager for node.js
i llvm # Install llvm, used to make the crystal binary
i exa # Install exa, a drop-in replacement for ls (and tree)
i the_silver_searcher # Install ag, used to easily search through files
i fdupes # Install fdupes, used to quickly find duplicate files
i ripgrep # Install rg, a faster alternative to ag / ack / grep
i tig # Install tig, used to browse git commits
i ncdu # Install ncdu, used to easily see disk usage