Skip to content

Instantly share code, notes, and snippets.

@connoro7
Created September 26, 2023 18:36
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 connoro7/d445737fc7c0957d93293fcefefa9078 to your computer and use it in GitHub Desktop.
Save connoro7/d445737fc7c0957d93293fcefefa9078 to your computer and use it in GitHub Desktop.
ripgrep rc
# Ripgrep Syntax
# rg <search_pattern> <directory_of_file>
# Multiple files
# rg <search_pattern> <directory_of_file> <directory_of_file>
# Print as vim-compatible results
# --vimgrep
# Search hidden files
--hidden
# Don't let ripgrep vomit really long lines, and show a preview
--max-columns=150
--max-columns-preview
# Limit number of lines per matching file
--max-count=10
# Add my 'web' type
# --type-add
# web:*.{html,css,js}*
# Using glob patterns to include/exclude files or folders
# --glob=!git/*
# or
--glob
!node_modules/
--glob
!.git/
--glob
!bundle.*
# Equivalent to --color always --heading --line-number
--pretty
# Make the colors more to my liking
--colors=line:style:bold
# Because who TF cares about case
--smart-case
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment