Help using zz after scroll with mini.animate #1436
-
Hello! I'm trying out This is what I currently have:
The first keymap is not working, but the others are. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Also, it seems to lag when I reach the end of a file while holding |
Beta Was this translation helpful? Give feedback.
-
This is because it executes But I'd say that any centering after scroll will have limited support, unfortunately. Mostly due to the fact that scroll is done with side effects (basically, what is said here) and the "general" nature of how scrolling is implemented. |
Beta Was this translation helpful? Give feedback.
This is because it executes
vim.cmd("exe "normal! \\<C-d>"")
which both not syntactically correct and (probably) won't work with\\<C-d>
as the argument tonormal!
. Use'<Cmd>lua vim.cmd("normal! \4"); '
(\4
is the "true" termcode/keycode for<C-d>
) as the first part of the mapping's RHS.But I'd say that any centering after scroll will have limited support, unfortunately. Mostly due to the fact that scroll is done with side effects (basically, what is said here) and the "general" nature of how scrolling is implemented.