lf: esc-quit, opener und fzf-jump

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-06-22 08:42:11 +02:00
co-authored by Claude Opus 4.7
parent 3284977b29
commit ade50ceac4
+19
View File
@@ -18,6 +18,25 @@ set mouse true
map . set hidden!
map D delete
map <c-r> reload
map <esc> quit
# Fuzzy-Sprung im aktuellen Verzeichnis (rekursiv)
cmd fzf_jump ${{
res="$(fd --hidden --exclude .git . "$PWD" | fzf --reverse --header='Jump to')"
[ -n "$res" ] && lf -remote "send $id select \"$res\""
}}
map <c-f> fzf_jump
# Öffnen: bei Verzeichnissen reinwechseln, sonst an den Opener delegieren
cmd open ${{
case $(file --mime-type -Lb "$f") in
text/*|application/json|application/javascript|application/xml) ${EDITOR:-kak} "$f" ;;
image/*) imv "$f" >/dev/null 2>&1 & ;;
video/*|audio/*) mpv "$f" >/dev/null 2>&1 & ;;
application/pdf) zathura "$f" >/dev/null 2>&1 & ;;
*) xdg-open "$f" >/dev/null 2>&1 & ;;
esac
}}