vimtricks.wiki Concise Vim tricks, one at a time.

How do I scroll the screen down by one line without moving the cursor?

Answer

<C-e>

Explanation

The <C-e> 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). It is useful for peeking at nearby content.

How it works

  • <C-e> scrolls the viewport down by one line
  • The cursor stays on its current position unless it would go above the visible area
  • Accepts a count: 5<C-e> scrolls down 5 lines

Example

If the window shows lines 20-50 and the cursor is on line 35, pressing <C-e> changes the view to lines 21-51 while the cursor remains on line 35.

Tips

  • <C-y> scrolls up one line (the counterpart)
  • These are useful when you want to see more context without jumping away
  • Combine with zz afterward to re-center the cursor

Next

How do you yank a single word into a named register?