185

I can't find how to disable word-wrap in Xcode 4 editor. How can I do it?

eonil
  • 83,476
  • 81
  • 317
  • 516

3 Answers3

272

Go to Xcode Preferences -> Text Editing -> Indentation and deselect Line wrapping.

David Hancock
  • 14,861
  • 4
  • 41
  • 44
  • 3
    In the file inspector, in the utilities panel (one on the right), theres a check box to enable/disable this for each file individually. – Matt Le Fleur Jul 03 '15 at 14:25
  • 3
    Haha, I “always” thought that it was impossible to turn line wrapping in Xcode. Then I come to this answer, and I see I’ve already upvoted it in the past. -_- – Léo Natan May 09 '17 at 17:48
28

David Hancock has it right (Xcode Preferences -> Text Editing -> Indentation and deselect Line wrapping), but just to add on -- even after reading that, I had trouble finding the option. I see now that Editing and Indentation are at the top of the box, but they are only written in clickable text (at least in Xcode 5)... I was expecting more of a conventional tab UI and had skipped right over them the first couple of times I looked.

enter image description here

Just a heads-up for anyone like me who might have accidentally skipped over them too...

ThisClark
  • 14,352
  • 10
  • 69
  • 100
Matt
  • 1,101
  • 11
  • 11
2

For those who couldn't find the line wrap setting, it has been moved to the Display tab:

Xcode -> Preferences... -> Text Editing -> Display -> Line Wrapping

Xcode -> Preferences... -> Text Editing -> Display -> Line Wrapping

trphuongnam15
  • 61
  • 2
  • 4