Disabling Word-Wrap in XCode
Asked Answered
H

4

14

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.

Henkel answered 12/10, 2011 at 13:30 Comment(0)
R
7

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

Robertoroberts answered 2/4, 2021 at 18:42 Comment(0)
T
23

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

Tubman answered 12/10, 2011 at 17:1 Comment(1)
This is now under Display not IndentationNativeborn
E
7

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

Elliot answered 12/10, 2011 at 17:1 Comment(0)
R
7

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

Robertoroberts answered 2/4, 2021 at 18:42 Comment(0)
C
3

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.

Coz answered 10/1, 2020 at 5:15 Comment(1)
This seems to overwrite the Xcode preferences. I would recommend to use the personal Xcode settings, because not everyone would want to view this file in the same wrapping/non-wparring style.Freestone

© 2022 - 2024 — McMap. All rights reserved.