How do I keep the cursor line always centered on the screen while scrolling?
By default, Vim only scrolls the viewport when the cursor reaches the very top or bottom of the screen.
category:
navigation
tags:
#navigation
#scrolling
#config
#cursor
#scrolloff
How do I center the screen on my cursor without leaving insert mode?
When you are typing in insert mode and the cursor drifts near the top or bottom of the screen, you normally have to press , then zz, then i or a to continue edi
category:
navigation
tags:
#navigation
#insert-mode
#scrolling
#normal-mode
How do I scroll the screen to position the cursor line at the center, top, or bottom?
Vim's z scroll commands reposition the screen relative to the cursor without moving the cursor itself.
category:
navigation
tags:
#navigation
#scrolling
#viewport
#cursor-position
How do I make two windows scroll together in sync?
The scrollbind option locks the scrolling of two or more windows together so they scroll in unison.
category:
navigation
tags:
#navigation
#scrolling
#windows
How do I scroll the screen down by one line without moving the cursor?
The command scrolls the window down one line at a time while keeping the cursor on its current line (until the cursor would go off-screen).
category:
navigation
tags:
#navigation
#scrolling
#normal-mode
How do I scroll the screen up by one line without moving the cursor?
The command scrolls the window up one line at a time while keeping the cursor position fixed.
category:
navigation
tags:
#navigation
#scrolling
#normal-mode
How do I set a minimum number of lines to keep visible above and below the cursor?
The scrolloff option keeps a minimum number of lines visible above and below the cursor when scrolling.
category:
navigation
tags:
#navigation
#scrolling
#config
How do I scroll so the current line is at the bottom of the screen?
The zb command redraws the screen with the current line at the bottom of the window.
category:
navigation
tags:
#navigation
#scrolling
#normal-mode
How do I scroll the screen so the current line is at the top or bottom?
The zt and zb commands scroll the viewport so the current cursor line appears at the top or bottom of the screen respectively, without moving the cursor.
category:
navigation
tags:
#navigation
#scrolling
#viewport
#normal-mode
How do I scroll the screen so the current line is at the top?
The zt command repositions the viewport so that the line where your cursor sits moves to the top of the screen, without changing your cursor position within the
category:
navigation
tags:
#navigation
#scrolling
#normal-mode
#viewport
#productivity