fish/functions/vimhist.fish @ 97e37a4c1138 default tip

More
author Steve Losh <steve@stevelosh.com>
date Tue, 13 Oct 2026 10:31:54 -0400
parents (none)
children (none)
function vimhist -d "Edit history with Vim, copy the result."
    set tmpfile (mktemp vimhist.XXXXXX)
    history -n 20 --reverse > "$tmpfile"
    vim -c 'set ft=fish' "$tmpfile"
    cat "$tmpfile" | pbcopy
    rm "$tmpfile"
end