RLH
RLH

Reputation: 15698

Disabling Word-Wrap in XCode

I'd like to disable the Word-Wrap "feature" in XCode. Can this be done? I can't find a setting or a hotkey that will do this.

Also, before stating "long lines of code are bad-- keep them short and format the wrapping yourself", please realize two things.

First, I often keep multiple code pages open for reference, so they are each pretty small. Second, I am using XCode strictly as an editor for an existing, embedded systems project. I didn't write most of this code and much of it is 80+ characters wide because of heavy use of code indention.

Upvotes: 15

Views: 5828

Answers (5)

yoAlex5
yoAlex5

Reputation: 34175

Xcode Wrap Lines

Editor -> Wrap Lines

Upvotes: 0

Graystripe
Graystripe

Reputation: 381

This is moved (at least as of) Xcode 12.4:
Xcode > Preferences > Text Editing > Display > Wrap lines to editor width

Upvotes: 7

Angel F Syrus
Angel F Syrus

Reputation: 2042

In Xcode 11 you can achieve it by checking Wrap lines with in the Xcode.

Step 1:

Select file inspector

enter image description here

Step 2:

Under Text setting check Wrap lines

enter image description here

Hope it will help someone Using latest Xcode.

Upvotes: 3

Joshua Nozzi
Joshua Nozzi

Reputation: 61228

Main Menu > Xcode > Preferences..., select Text Editing tab. Select Indentation sub tab. Uncheck Line Wrapping.

Upvotes: 7

p4010
p4010

Reputation: 943

I think that you are searching for the checkbox under Preferences>Text editing>Indentation>Wrap lines to editor width.

Upvotes: 23

Related Questions