Compare commits

..

No commits in common. "lfrc" and "main" have entirely different histories.
lfrc ... main

View file

@ -1,47 +1,23 @@
cmap <tab> cmd-menu-complete cmap <tab> cmd-menu-complete
cmap <backtab> cmd-menu-complete-back cmap <backtab> cmd-menu-complete-back
cmd fzf_search ${{ ## https://github.com/gokcehan/lf/wiki/Integrations#eza
cmd="rg --column --line-number --no-heading --color=always --smart-case" #cmd on-select &{{
fzf --ansi --disabled --layout=reverse --header="Search in files" --delimiter=: \ # lf -remote "send $id set statfmt \"$(eza -ld --color=always "$f" | sed 's/\\/\\\\/g;s/"/\\"/g')\""
--bind="start:reload([ -n {q} ] && $cmd -- {q} || true)" \ #}}
--bind="change:reload([ -n {q} ] && $cmd -- {q} || true)" \ #
--bind='enter:become(lf -remote "send $id select \"$(printf "%s" {1} | sed '\''s/\\/\\\\/g;s/"/\\"/g'\'')\"")' \ #cmd git_branch ${{
--preview-window='+{2}-/2' \ # git branch | fzf | xargs git checkout
--preview='bat --color=always --highlight-line={2} -- {1}' # pwd_shell="$(pwd | sed 's/\\/\\\\/g;s/"/\\"/g')"
# --preview='cat -- {1}' # Use your favorite previewer here (bat, source-highlight, etc.), for example: # lf -remote "send $id updir; cd \"$pwd_shell\""
# --preview-window='+{2}-/2' \ #}}
# --preview='bat --color=always --highlight-line={2} -- {1}' #map gb :git_branch
# Alternatively you can even use the same previewer you've configured for lf #map gp $clear; git pull --rebase || true; echo "press ENTER"; read ENTER
#--preview='~/.config/lf/cleaner; ~/.config/lf/previewer {1} "$FZF_PREVIEW_COLUMNS" "$FZF_PREVIEW_LINES" "$FZF_PREVIEW_LEFT" "$FZF_PREVIEW_TOP"')" #map gs $clear; git status; echo "press ENTER"; read ENTER
}} #map gl $clear; git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
map gs :fzf_search #
#cmd on-cd &{{
# fmt="$(STARSHIP_SHELL= starship prompt | sed 's/\\/\\\\/g;s/"/\\"/g')"
# lf -remote "send $id set promptfmt \"$fmt\""
#}}
# https://github.com/gokcehan/lf/wiki/Integrations#eza
cmd on-select &{{
lf -remote "send $id set statfmt \"$(eza -ld --color=always "$f" | sed 's/\\/\\\\/g;s/"/\\"/g')\""
}}
cmd git_branch ${{
git branch | fzf | xargs git checkout
pwd_shell="$(pwd | sed 's/\\/\\\\/g;s/"/\\"/g')"
lf -remote "send $id updir; cd \"$pwd_shell\""
}}
map gb :git_branch
map gp $clear; git pull --rebase || true; echo "press ENTER"; read ENTER
map gs $clear; git status; echo "press ENTER"; read ENTER
map gl $clear; git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
cmd on-cd &{{
fmt="$(STARSHIP_SHELL= starship prompt | sed 's/\\/\\\\/g;s/"/\\"/g')"
lf -remote "send $id set promptfmt \"$fmt\""
}}
set sixel true
set previewer ~/.config/lf/previewer
# https://github.com/gokcehan/lf/wiki/Previews#with-sixel
# set previewer ctpv
# set cleaner ctpvclear
# &ctpv -s $id
# &ctpvquit $id