Skip to content

Commit

Permalink
kks-buffers: add keybindings to delete buffer and create new scratch
Browse files Browse the repository at this point in the history
  • Loading branch information
kkga committed Sep 14, 2021
1 parent 1a3843a commit 594dc3f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/kks-buffers
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@

kks get %val[buflist] |
grep -F "$*" |
fzf --height 100% --prompt 'buf> ' --preview 'kks cat -b {} | highlight --line-range=1-100 --force -O ansi' |
fzf --height 100% --prompt 'buf> ' --preview 'kks cat -b {} | highlight --line-range=1-100 --force -O ansi' \
--header="[c-x] delete, [c-t] new scratch" \
--bind="ctrl-x:execute-silent(kks send -b {} delete-buffer)+reload(kks get %val[buflist])" \
--bind="ctrl-t:execute-silent(kks send edit -scratch {q})+reload(kks get %val[buflist])" |
while read -r name; do
kks send buffer "$name"
done

0 comments on commit 594dc3f

Please sign in to comment.