DELAPARRA
Index
Color
NL
Category: Keyboard shortcuts

Delete Previous Word

Explained by Updated

What is Delete Previous Word?

Delete Previous Word: Delete the word to the left of the cursor on the command line. In most terminals, Ctrl+W deletes the word to the left of the cursor. Alt+Backspace often does the same with slightly different rules for punctuation. In editors, Ctrl+Backspace or Option+Backspace deletes the previous word. It is much faster than holding Backspace when you mistype a long argument or want to change the last part of a command.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about Delete Previous Word

What should you keep in mind with Delete Previous Word?

A few related shell shortcuts are worth knowing too. Ctrl+U clears everything before the cursor, Ctrl+K everything after it, Ctrl+A jumps to the start of the line and Ctrl+E to the end. Together they make editing long commands, such as Docker or kubectl calls with many options, much less frustrating. Note that Ctrl+W closes the tab in many browser-based terminals.

At a glance

CategoryKeyboard shortcuts
Explained by
Updated

More Keyboard shortcuts terms

All terms starting with D

Skills

Manuals

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.