lf: esc-quit, opener und fzf-jump
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -18,6 +18,25 @@ set mouse true
|
|||||||
map . set hidden!
|
map . set hidden!
|
||||||
map D delete
|
map D delete
|
||||||
map <c-r> reload
|
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
|
||||||
|
}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user