Shortcut

Vim Delete the Character Before the Cursor Shortcut

The Vim shortcut to delete the character before the cursor is X on Windows. It's the same on Mac.

Quick Answer

Windows
X
Mac
X
Web
Not confirmed yet
VimShortcut

Delete the Character Before the Cursor

Windows
X

Removes the character behind the cursor.

Learn More

How to delete the character before the cursor in Vim

  1. Open Vim and go to where you want to delete the character before the cursor.
  2. Press X on Windows or X on Mac.

Vim Delete the Character Before the Cursor Shortcut for Windows

Press X.

Vim Delete the Character Before the Cursor Shortcut for Mac

Press X.

Vim Delete the Character Before the Cursor Shortcut for Vim Web

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

Related Keyboard Shortcuts

Frequently asked questions

What is the Vim delete the character before the cursor shortcut?

On Windows, press X. On a Mac, press X.

Is there a Mac shortcut to delete the character before the cursor in Vim?

Yes: X.

Does it work in Vim for the web?

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

Official source · How we verify