Unfortunately there is no binary package of lf on RPI.
https://github.com/gokcehan/lf/tree/master?tab=readme-ov-file
lf is written is written in go, so that is required to compile it.
I try to maintain a Setup Sript that installs lf the way I like it.
Configuration is in /etc/lf/lfrc. Pressing 'C' in lf opens the configurationfile in an editor.
cmd edit-config ${{
$EDITOR /etc/lf/lfrc
lf -remote "send $id source /etc/lf/lfrc"
}}
map C edit-config
To have lf exit in to the last directory, an alias can be defined in .bashrc
lfcd () {
# `command` is needed in case `lfcd` is aliased to `lf`
cd "$(command lf -print-last-dir "$@")"
}
alias lf=lfcd
Mailcap is a convenient way to define which external Programms are used for viewing, editing and executing various file types. There is a rust version of mailcap. https://github.com/cglindkamp/run-mailcap-rs.git
Again this needs to be compiled. In the lf configuration the previewer is set:
set previewer run-mailcap-rs
The config file is in ~/.mailcap.
Copy: y (mark file/dir) , p (paste) pp/po (overwrite)
Move: d (mark file/dir) , p (paste) pp/po (overwrite)
Make Dir: a
Rename: r
mark-save (modal) (default 'm')
mark-load (modal) (default "'")
mark-remove (modal) (default '"')
:toggle_preview
https://github.com/junegunn/fzf?tab=readme-ov-file#usage
fzf will launch interactive finder, read the list from STDIN, and write the selected item to STDOUT.
find * -type f | fzf > selected
Without STDIN pipe, fzf will traverse the file system under the current directory to get the list of files.
vim $(fzf)
Aliases
vf
vfi
Codeium
Map leader
apt install gh
gh auth login