AutoYADM commit: 2025-05-22 00:08:39
This commit is contained in:
parent
5ceb87dd7b
commit
75653fba8c
2 changed files with 27 additions and 0 deletions
|
@ -1,3 +1,19 @@
|
|||
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 %{
|
||||
eval "ui-scrolloff-disable"
|
||||
evaluate-commands -no-hooks -- %sh{
|
||||
hop-kak --keyset "$kak_opt_hop_kak_keyset" --sels "$kak_selections_desc"
|
||||
}
|
||||
eval "ui-scrolloff-enable"
|
||||
}
|
||||
|
||||
# TODO: fix the broken interaction with scrolloff
|
||||
define-command -override hop-kak-words %{
|
||||
execute-keys 'gtGbxs\w+<ret>: hop-kak<ret>'
|
||||
}
|
||||
|
|
|
@ -18,6 +18,17 @@ map -docstring "toggle soft wrap" global ui w ": ui-wrap-toggle<ret>"
|
|||
|
||||
declare-option str base_scrolloff %opt{scrolloff}
|
||||
|
||||
declare-option -hidden str prev_scrolloff %opt{base_scrolloff}
|
||||
|
||||
define-command ui-scrolloff-disable %{
|
||||
set-option window prev_scrolloff %opt{scrolloff}
|
||||
set-option window scrolloff 0,0
|
||||
}
|
||||
|
||||
define-command ui-scrolloff-enable %{
|
||||
set-option window scrolloff %opt{prev_scrolloff}
|
||||
}
|
||||
|
||||
define-command ui-scrolloff-toggle -docstring "toggle scrolloff" %{
|
||||
evaluate-commands %sh{
|
||||
CUR="$kak_opt_scrolloff"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue