Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Center Editor WindowNew to Visual Studio Code? Get it now.
Center Editor Window

Center Editor Window

Kai Wood

|
40,558 installs
| (20) | Free
Centers your editor window at the current cursor position
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Center Editor Window

Center the active editor around the current cursor position.

Run Center Editor Window from the command palette, or press Ctrl+L.

Centering the window

Settings

  • center-editor-window.threeStateToggle: toggle between centering the current line, moving it to the top of the viewport, and moving it to the bottom.
  • center-editor-window.offset: offset from the center target when centering.
  • center-editor-window.typewriterScrollMode: keep the current line centered whenever the cursor changes lines.
  • center-editor-window.centerOnUndoRedo: keep the current line centered after undo or redo.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft