4 ms·
Maybe rg or fzf and bat
by 29athrowaway 3y ago
Maybe rg or fzf and bat
- nickjj 3y agoThat's what I do with this bit of built-in FZF configuration: export FZF_CTRL_T_OPTS="--preview='less {}' --height=100% --bind shift-up:preview-page-up,shift-down:preview-page-down" This lets you hit CTRL+t and immediately start previewing files in a directory with an ability to page between results. A video walk through and demo of that is here: https://nickjanetakis.com/blog/customize-fzf-ctrl-t-binding-to-preview-files https://nickjanetakis.com/blog/customize-fzf-ctrl-t-binding-...
- hiAndrewQuinn 3y agoThis was super helpful actually, I somehow totally missed Ctrl-T being a thing and this makes it even nicer.
- nickjj 3y agoNo problem, if you want to invoke it with a raw command instead of a hotkey you can set up an alias, I use `pf` for preview files. You can reference FZF's env variable to reduce duplication too: alias pf="fzf ${FZF_CTRL_T_OPTS}"
- 29athrowaway 3y agoCtrl-O for ranger or one of its rewrites is a great idea too.