Skip to content

Instantly share code, notes, and snippets.

@penn201500
Forked from asrivascrealytee/.ripgreprc
Last active September 13, 2019 03:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save penn201500/d45ae11511f5d5eb63d294f50b57b9fa to your computer and use it in GitHub Desktop.
Save penn201500/d45ae11511f5d5eb63d294f50b57b9fa to your computer and use it in GitHub Desktop.
ripgreprc
#First, you need to set the RIPGREP_CONFIG_PATH environment variable to the file path of your config file
# export RIPGREP_CONFIG_PATH=$HOME/.ripgreprc
# Don't let ripgrep vomit really long lines to my terminal.
--max-columns=150
--max-columns-preview
# Add my 'web' type.
--type-add
web:*.{html,css,js}*
# Because who cares about case!?
--smart-case
# Count the number of matches
--count
## make the output look like The Silver Searcher's output
## https://github.com/BurntSushi/ripgrep/blob/master/FAQ.md#silver-searcher-output
--colors=line:fg:yellow
--colors=line:style:bold
--colors=path:fg:green
--colors=path:style:bold
--colors=match:fg:black
--colors=match:bg:yellow
--colors=match:style:nobold
--hidden
# Show context by default
--context=3
# Always show line numbers for matches
--line-number
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment