4 ms·
I glue together ripgrep with fzf and bat like this: rg --line-number --no-heading --color=always --smart-case "$@" | fzf -d ':' -n 2.. --ansi --no-sort --p
by eminence32 5y ago
I glue together ripgrep with fzf and bat like this:
rg --line-number --no-heading --color=always --smart-case "$@" | fzf -d ':' -n 2.. --ansi --no-sort --preview-window 'down:20%:+{2}' --preview 'bat --style=numbers --color=always --highlight-line {2} {1}'
I get a small preview of the file in the bottom 20% of my terminal, and I can use fzf's matching to further filter, or to exclude things
I capture the output and then `cut` it up to get filename and line number, which then get used to open the file/line in vim
- anotherhue 5y agoThank you for this