dotfiles/.config/kak/autoload/helix-scroll.kak

13 lines
400 B
Text

declare-option -hidden int helix_up_line
define-command -hidden helix-up %{
set-option window helix_up_line %val{cursor_line}
execute-keys <c-u>
evaluate-commands %sh{
if [ "$kak_cursor_line" = "$kak_opt_helix_up_line" ]; then
echo "execute-keys gg"
else
echo "nop"
fi
}
}
map -docstring 'helix scroll up' global normal <c-u> ": helix-up<ret>"