I can't find how to disable word-wrap in Xcode 4 editor. How can I do it?
-
20Because SO recommends up voting to questions too when you find useful information. – eonil Jun 12 '12 at 10:43
-
12Because it is so not obvious I still need the answer of this question, 2 years after it has been asked. – Micka May 22 '13 at 14:01
-
9The question is useful because the UI is not intuitive – Justin Ohms Jul 05 '13 at 19:50
-
3I sometimes wonder how long Apple guys will keep it. Now we're on Xcode 5 era. – eonil Nov 16 '13 at 06:30
-
Xcode 6 - still the same. Thanks for the question (and answer below of cource) – vir us Jul 28 '14 at 08:27
-
Come on. Word wrap in a code editor by default? Seems apple is so "perfect" that they think editing code is the same as a document file. – Cesar Nov 28 '20 at 16:31
3 Answers
Go to Xcode Preferences -> Text Editing -> Indentation
and deselect Line wrapping
.

- 14,861
- 4
- 41
- 44
-
3In 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
-
3Haha, 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
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.
Just a heads-up for anyone like me who might have accidentally skipped over them too...
-
Took me a moment too to realize it was more of a tab up top for indentation than an area in the main text editing option section. – AtheistP3ace Jan 22 '16 at 16:17
-
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

- 61
- 2
- 4