diff --git a/scripts/kks-buffers b/scripts/kks-buffers index 3e087d6..0478c37 100755 --- a/scripts/kks-buffers +++ b/scripts/kks-buffers @@ -4,10 +4,11 @@ # # requires: # - fzf (https://github.com/junegunn/fzf) -# - highlight (faster than bat, change to your liking) (https://gitlab.com/saalen/highlight) +# - bat (change to your liking) (https://github.com/sharkdp/bat) -preview_cmd="highlight --line-range=1-100 -t 4 --force -O ansi -" +preview_cmd="bat --color=always --line-range=:500" history_file="$HOME/.cache/kks-buffers-history" + [ -f "$history_file" ] || touch "$history_file" kks get %val[buflist] | diff --git a/scripts/kks-files b/scripts/kks-files index eb768fa..f771ea3 100755 --- a/scripts/kks-files +++ b/scripts/kks-files @@ -5,10 +5,11 @@ # requires: # - fd (https://github.com/sharkdp/fd) # - fzf (https://github.com/junegunn/fzf) -# - highlight (faster than bat, change to your liking) (https://gitlab.com/saalen/highlight) +# - bat (change to your liking) (https://github.com/sharkdp/bat) -preview_cmd="highlight --line-range=1-100 -t 4 --force -O ansi" +preview_cmd="bat --color=always --line-range=:500" history_file="$HOME/.cache/kks-files-history" + [ -f "$history_file" ] || touch "$history_file" fd --type file . "$@" | diff --git a/scripts/kks-grep b/scripts/kks-grep index 062a98d..16893b3 100755 --- a/scripts/kks-grep +++ b/scripts/kks-grep @@ -7,6 +7,7 @@ # - fzf (https://github.com/junegunn/fzf) history_file="$HOME/.cache/kks-grep-history" + [ -f "$history_file" ] || touch "$history_file" rg --vimgrep '.+' "$@" | diff --git a/scripts/kks-mru b/scripts/kks-mru index d1141d0..0b189a1 100755 --- a/scripts/kks-mru +++ b/scripts/kks-mru @@ -4,7 +4,7 @@ # # requires: # - fzf (https://github.com/junegunn/fzf) -# - highlight (faster than bat) (https://gitlab.com/saalen/highlight) +# - bat (change to your liking) (https://github.com/sharkdp/bat) # # for this to work, add the following in kakrc: # (requires sponge from moreutils: https://joeyh.name/code/moreutils/) @@ -15,7 +15,7 @@ # } # } -preview_cmd="highlight --line-range=1-100 -t 4 --force -O ansi" +preview_cmd="bat --color=always --line-range=:500" (fzf --height 100% --prompt 'mru> ' --preview "$preview_cmd {}" | xargs -r kks edit) < ~/.cache/kak-mru