dotfiles/.config/kak/autoload/hop.kak

23 lines
663 B
Text

evaluate-commands %sh{ hop-kak --init }
declare-option str hop_kak_keyset 'tnserigmaodhc,x.plfuwyqz'
# select visible buffer
map global normal <a-%> ':execute-keys gtGbx<ret>'
define-command hop-kak %{
evaluate-commands -no-hooks -- %sh{
hop-kak --keyset "$kak_opt_hop_kak_keyset" --sels "$kak_selections_desc"
}
}
# TODO: fix the broken interaction with scrolloff
define-command -override hop-kak-words %{
eval "ui-scrolloff-disable"
try %{ ui-wrap-disable }
# set-option window scrolloff 0,0
execute-keys 'gtGbxs\w+<ret>: hop-kak<ret>'
info done
# set-option window scrolloff 99,0
# eval "ui-scrolloff-enable"
}