summaryrefslogtreecommitdiff
path: root/home/xyz/.config/lf
diff options
context:
space:
mode:
authorXiao Pan <gky44px1999@gmail.com>2024-04-13 23:32:55 -0700
committerXiao Pan <gky44px1999@gmail.com>2024-04-13 23:32:55 -0700
commitd03631af6f83aca39415c3970bae8fd78efeb737 (patch)
treec1df549df56b8d03aae8bb1e89eb861a2dac59e1 /home/xyz/.config/lf
parent88e311b269928e065e505d293cebc0a9726da49d (diff)
lf change some keybindings to my like
Diffstat (limited to 'home/xyz/.config/lf')
-rw-r--r--home/xyz/.config/lf/lfrc23
1 files changed, 23 insertions, 0 deletions
diff --git a/home/xyz/.config/lf/lfrc b/home/xyz/.config/lf/lfrc
index c78889d6..b0ca2284 100644
--- a/home/xyz/.config/lf/lfrc
+++ b/home/xyz/.config/lf/lfrc
@@ -1 +1,24 @@
+# maybe useful:
+# /usr/share/doc/lf/lfrc.example
+# `man lf`
+# - ENVIRONMENT VARIABLES section
+# - PREVIEWING FILES section
+# https://github.com/LukeSmithxyz/voidrice/tree/master/.config/lf
+
set hidden
+
+# not using it because security concerns, see: https://wiki.archlinux.org/title/Lf#Sandboxing_previews
+# I moved previewer script to public_archive_codes
+# previewer use highlight which can show tab as 4 spaces
+#set previewer ~/.config/lf/previewer
+#map e $LESSOPEN='| ~/.config/lf/previewer %s' less -+F $f
+
+# change come default keybindings to my like
+# see `man lf` PREFIXES section, $ at the beginning indicate it is shell command?
+# also see "The following commands/keybindings are provided by default:" section
+# I use -F in LESS env, need -+F to reset to default so no quit if one screen
+map e $$PAGER -+F "$f"
+# or wait for key press use ! prefix
+#map e !$PAGER "$f"
+map v $$EDITOR "$f"
+map i invert