Skip to content

Commit

Permalink
use bat in scripts, since it's more common
Browse files Browse the repository at this point in the history
  • Loading branch information
kkga committed Sep 18, 2021
1 parent 25ce81e commit 8e27167
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
5 changes: 3 additions & 2 deletions scripts/kks-buffers
Original file line number Diff line number Diff line change
Expand Up @@ -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] |
Expand Down
5 changes: 3 additions & 2 deletions scripts/kks-files
Original file line number Diff line number Diff line change
Expand Up @@ -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 . "$@" |
Expand Down
1 change: 1 addition & 0 deletions scripts/kks-grep
Original file line number Diff line number Diff line change
Expand Up @@ -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 '.+' "$@" |
Expand Down
4 changes: 2 additions & 2 deletions scripts/kks-mru
Original file line number Diff line number Diff line change
Expand Up @@ -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/)
Expand All @@ -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

0 comments on commit 8e27167

Please sign in to comment.