I'd like to disable the Word-Wrap "feat开发者_如何学编程ure" 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.
I think that you are searching for the checkbox under Preferences>Text editing>Indentation>Wrap lines to editor width.
Main Menu > Xcode > Preferences..., select Text Editing tab. Select Indentation sub tab. Uncheck Line Wrapping.
This is moved (at least as of) Xcode 12.4:
Xcode > Preferences > Text Editing > Display > Wrap lines to editor width
In Xcode 11 you can achieve it by checking Wrap lines
with in the Xcode.
Step 1:
Select file inspector
Step 2:
Under Text setting check Wrap lines
Hope it will help someone Using latest Xcode.
精彩评论