Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Keyboard combo to quickly delete last word or entire line Apps
I just accidentally discovered that in most typing fields in 10.6 or 10.7 (and maybe older as well) that if you hold down Option and hit Delete OS X will delete the last word you typed. If you hold Command and hit Delete it will delete the entire line.

I haven't stumbled across this documented anywhere and it will become part of my keyboarding repertoire. I confirmed it works in iChat, TextEdit, Mail and Safari so I would think it's part of the standard text input library. In MS Word 2008 and 2011 both command and option delete only remove the previous word.

[crarko adds: This is part of the Cocoa text handling system. I found an earlier reference in this hint but it's buried in there and so this particular usage may not be well-known. I trust nobody will be too alarmed if it's pointed out again.]
    •    
  • Currently 3.11 / 5
  You rated: 4 / 5 (9 votes cast)
 
[13,325 views]  

Keyboard combo to quickly delete last word or entire line | 15 comments | Create New Account
Click here to return to the 'Keyboard combo to quickly delete last word or entire line' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Keyboard combo to quickly delete last word or entire line
Authored by: karog on Oct 14, '11 08:22:16AM

Actually Cmd-Delete deletes from the current position to the beginning of the line, not the entire line.

Also, Option-FwdDelete deletes one word to the right. And you would think for symmetry that Cmd-FwdDelete would delete from the current position to the end of line but curiously it does not.



[ Reply to This | # ]
Keyboard combo to quickly delete last word or entire line
Authored by: lras on Oct 14, '11 08:40:25AM

Yeah, for delete to the end of the line one can use ctrl-k (same as in Emacs).

Edited on Oct 14, '11 08:40:57AM by lras



[ Reply to This | # ]
Keyboard combo to quickly delete last word or entire line
Authored by: Lri on Oct 14, '11 08:57:36AM

Make ⌘⌦ work like ⌃K:

d=~/Library/KeyBindings/; mkdir -p $d; echo $'{\n\t"@\UF728" = deleteToEndOfParagraph:;\n}' > $d/DefaultKeyBinding.dict
Edited on Oct 14, '11 08:59:09AM by Lri


[ Reply to This | # ]
Keyboard combo to quickly delete last word or entire line
Authored by: lras on Oct 14, '11 08:38:01AM

Neat! It also seems to work for the cursor keys.



[ Reply to This | # ]
Keyboard combo to quickly delete last word or entire line
Authored by: dzurn on Oct 14, '11 09:50:45AM

Usually I'd object to a dupe hint, but the more people that know about the wonders of the built-in Cocoa text enter system, the better.

---
Madness takes its toll.
Please have exact change.



[ Reply to This | # ]
Keyboard combo to quickly delete last word or entire line
Authored by: enigmamf on Oct 14, '11 09:59:23AM

I could have sworn this was the case all the way back to System 7, but after being motivated to pull out my old System 7.5.5 Mac Classic: No Dice!



[ Reply to This | # ]
Keyboard combo to quickly delete last word or entire line
Authored by: matters on Oct 14, '11 11:14:23AM

Not trying to be a jerk, but I feel sorry for anyone just now learning this, especially if you write a lot on the computer haha :)

It's probably one of the biggest timesavers in the entire OS. My friend taught me it back in 2006 or so.

Glad someone mentioned it on here!

It also works if you hold down Shift at the same time, for quickly *selecting* words (or multiple words), or entire lines. Useful for copying chunks of text quickly.



[ Reply to This | # ]
Keyboard combo to quickly delete last word or entire line
Authored by: slb on Oct 14, '11 01:15:22PM

Well, you failed in your attempts, sorry. There are millions of NEW Mac users out there - get used to it.
Why or why can't people ignore this rather than tell us all how smart YOU are???

Peace.



[ Reply to This | # ]
Keyboard combo to quickly delete last word or entire line
Authored by: pjh625 on Oct 14, '11 12:11:57PM

In MacJournal, Cmd-Delete deletes the whole entry - so maybe some caution is needed with 3rd party apps?



[ Reply to This | # ]
Keyboard combo to quickly delete last word or entire line
Authored by: philostein on Oct 14, '11 10:29:16PM

I have known about this hint for a long time.

This information was passed down to me by my father, and my father's father (whose grandfather passed it to him). Generations of my family have laboured over their Macs, their life's ambition to glean every last grain of knowledge from these magical devices. When I reached manhood, I joined my forebears in their righteous task.

Finally, this year, after untold nights of swiping and keyboard shortcut use, I have fulfilled my family's destiny.

I am become Mac, destroyer of hints.

I have transcended my human form and become one with my laptop. And from my exalted position I look down on your puny hint, and see it is not capable of adding one iota of information to my total recall of OS X (but curiously it is well worth commenting upon).

Therefore, I duly banish your hint to the bowels of the hint community, there to be fought over by recent PC converts and your uncle (who only sends the occasional email or two), like a pack of ravenous dogs that they are.

Embrace your fate, and know that your submissions will never be worthy while I move among you and your kind (which will be for the rest of eternity).

I am watching.



[ Reply to This | # ]
I wish I'd done more research...
Authored by: gabester on Oct 15, '11 02:20:10AM

The hint could simply have been a link to this page from the older keybindings hint:

http://www.hcs.harvard.edu/~jrus/Site/System%20Bindings.html

Quick - does anyone remember what to type to activate the programmer's interrupt and then force quit an application on a classic Mac?
g=

Edited on Oct 15, '11 02:25:32AM by gabester



[ Reply to This | # ]
Keyboard combo to quickly delete last word or entire line
Authored by: TonyT on Oct 16, '11 07:19:15AM

Nothing new here......
see: http://guides.macrumors.com/Keyboard_shortcuts#Text_Shortcuts



[ Reply to This | # ]
Keyboard combo to quickly delete last word or entire line
Authored by: IWT on Oct 17, '11 01:26:19AM

Very nice one. Thank you.

Ian



[ Reply to This | # ]
Keyboard combo to quickly delete last word or entire line
Authored by: dgilz on Oct 17, '11 03:09:02AM

And hitting option + fn + delete will delete the word on the right from your position in the text ;-)

Another tick : to jump from one word to another hit option + right or left direction arrow to get to the word you want to delete, it saves you a lot of time when you want to change only a couple of words in a sentence.



[ Reply to This | # ]
Keyboard combo to quickly delete last word or entire line
Authored by: fbitterlich on Oct 18, '11 09:35:43AM

Generally, pressing <alt> when doing most anything that would normally apply to one letter, it will apply to one word. For example:
<alt> + <left>/<right>: Move left/right one word
<alt> + <shift> + <left>/<right>: Select one word left/right
<alt> + <backspace>: Delete one word to the left
<alt> + <delete>: Delete one word to the right.

And using the <cmd> key instead of <alt> will mostly extend that to the beginning/end of the current line.



[ Reply to This | # ]