evaluate-commands %sh{ hop-kak --init } declare-option str hop_kak_keyset 'tnserigmaodhcxplfuwyqz' # select visible buffer map global normal ':execute-keys gtGbx' 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 } map window normal ': trigger-user-hook donehop' map window normal , ': trigger-user-hook donehop,' hook -once window User donehop %{ eval "ui-scrolloff-enable" try %{ ui-wrap-enable } unmap window normal unmap window normal , } execute-keys 'gtGbxs\w+: hop-kak' }