Skip to content

Commit c319407

Browse files
committed
Center after down or up
1 parent 41e29cb commit c319407

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

init.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,9 @@ vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right win
190190
vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
191191
vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
192192

193+
vim.keymap.set('n', '<C-u>', '<C-u>zz', { desc = 'Scroll up half a page and center' })
194+
vim.keymap.set('n', '<C-d>', '<C-d>zz', { desc = 'Scroll down half a page center' })
195+
193196
-- [[ Basic Autocommands ]]
194197
-- See `:help lua-guide-autocommands`
195198

0 commit comments

Comments
 (0)