In an attempt to Taking back control of hjkl with modifiers keys :
- How can I jump the cursor half buffer (up/down) and at the same time center the view
v-v
? (kind of a calculated<#>gvv
?)
In an attempt to Taking back control of hjkl with modifiers keys :
v-v
? (kind of a calculated <#>gvv
?)I can use scrolloff 30,30
- that’s good enough — actually even better than expected.
floor( (bufferheigth - 5) / 2 )
?Something like this should work, subject to potential off-by-one issues (haven’t tested it thoroughly):
hook global WinResize .* %{
set-option window scrolloff %sh{
echo $(( (kak_window_height - 5) / 2 )),30
}
}
This works so cool! Thank you
scrolloff
areasNo problem, you might want to add a similar hook for the WinDisplay
event so that it runs on window creation and after switching from other buffers.