Shortcut

Emacs Delete blank lines around point Shortcut

The Emacs shortcut to delete blank lines around point is Ctrl + X, Ctrl + O on Windows. It's the same on Mac.

Quick Answer

Windows
Ctrl+X, Ctrl+O
Mac
Ctrl+X, Ctrl+O
Web
Not confirmed yet
EmacsShortcut

Delete blank lines around point

Windows
Ctrl+X, Ctrl+O

Clear the blank lines above and below the current line down to a single blank line (delete-blank-lines).

Learn More

How to delete blank lines around point in Emacs

  1. Open Emacs and go to where you want to delete blank lines around point.
  2. Press Ctrl + X, Ctrl + O on Windows or Ctrl + X, Ctrl + O on Mac.

Emacs Delete blank lines around point Shortcut for Windows

Press Ctrl + X, Ctrl + O.

Emacs Delete blank lines around point Shortcut for Mac

Press Ctrl + X, Ctrl + O.

Emacs Delete blank lines around point Shortcut for Emacs Web

We haven't confirmed a Emacs Web shortcut for this yet.

Version note: verify against the GNU Emacs Manual before publishing

Related Keyboard Shortcuts

Frequently asked questions

What is the Emacs delete blank lines around point shortcut?

On Windows, press Ctrl + X, Ctrl + O. On a Mac, press Ctrl + X, Ctrl + O.

Is there a Mac shortcut to delete blank lines around point in Emacs?

Yes: Ctrl + X, Ctrl + O.

Does it work in Emacs for the web?

We haven't confirmed a web version shortcut for this yet.

Official source · How we verify