Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So this has been driving me crazy for a while now: when you have a lot of blank space before a word, you go to the beginning of the line and push option-delete, it will delete not only the blank space, but also the next word. All editors in Windows and Linux will only delete the blank space. Is there a setting for this? This is an absolute must-have for me when, for example, trying to format code in XCode. As an example:

This is line 1 (caret->) |             this should not get deleted

Pushing option-delete, I expect this:

This is line 1 (caret->) |this should not get deleted

But instead, I get this:

This is line 1 (caret->) |should not get deleted

This is particularly nasty when you copy-paste code from somewhere, and get something like this:

UIImageView *imgView = [[UIImageView alloc] initWithFrame:

....and you want to quickly consolidate into one line. Does anyone have a fix for this?

share|improve this question
I think this behaviour is by design. I've just learned to work around it. – user479 May 18 '11 at 3:31
So how do you work around it? – Mirkules May 18 '11 at 4:19

I select the entire space and word as per your example. Then keeping Shift and Option pressed, I use the left arrow to select the empty space. Works like a charm and is only one extra keypress.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.