The Preview window
The preview window here is what FZF provides; there’s not a lot of magic added
to it except to use it imaginatively. You can use pretty much any code that
uses {} etc.
Best example is this, but you will perhaps not appreciate it unless you are somewhat familiar with the todo.txt format.
A simple example of a trivial addition to the preview mode is when you type
# and hit enter, you get to see the xxh128sum of the file also:
The code for that is one line in the command history file:
: key=# see file hash also ; toggle_xsum
and this function in the config file:
function toggle_xsum set -l p $preview_cmd set -l x "test -f {} && xxh128sum {}|rg --color=always -o '^.{ 32}' ; " set p (string replace $x '' $p) || set p "$x$p" set preview_cmd $p true end
Another example is git mode, which uses it to show git diff, git log, etc.