Page 1 of 1

How to Get Text to not Wrap in Text Editor Mode

Posted: Fri Oct 14, 2016 12:20 am
by cjboorman
I spend a lot of time bouncing between Author Mode and Text Mode. In Text Mode, the editor automatically displays the XML text wrapped across the screen (so it takes less space horizontally).

Image

This makes it difficult to see the staggering of the correct XML indentation - which is somewhat annoying.

Is there a way (a setting perhaps) to turn off wrapping, so I can easily see the staggering - so it looks like this?

Image


Thanks,

Chris Boorman.

Re: How to Get Text to not Wrap in Text Editor Mode

Posted: Fri Oct 14, 2016 9:53 am
by adrian
Hello Chris,

Note that the XML document itself is formatted that way with line breaks inserted at the established line width (hard wrapped).
If you don't want these line breaks, you can set the line width to a very large value (e.g. 100000) in Options > Preferences, Editor > Format, "Format and Indent" subsection, Line width - Format and Indent.
To apply this you'll have to format the document (once) in Text mode, Document > Source > Format and Indent (Ctrl+Shift+P) and save it.

Regards,
Adrian

Re: How to Get Text to not Wrap in Text Editor Mode

Posted: Tue Nov 01, 2016 10:48 pm
by cjboorman
Thanks - that worked! :D

Re: How to Get Text to not Wrap in Text Editor Mode

Posted: Tue Apr 04, 2017 3:35 pm
by ckabstein
Hi,

I have almost the same issue, but actually, I like the line wrapping in text mode for better legibility. My issue is that our translation tool interpretes a line break, such as seen in the following code:

Code: Select all


 <p><ph id="something123">(<wintitle>Name</wintitle> blabla 
something)</ph></p>
as follows:

<ph>(<wintitle>Name</wintitle> blabla {1}..........something)</ph>

Is there another way of handling this issue without changing the line width?

Thanks,
Christina

Re: How to Get Text to not Wrap in Text Editor Mode

Posted: Tue Apr 04, 2017 4:12 pm
by adrian
Hi,
Is there another way of handling this issue without changing the line width?
For this to work, the translation tool would have to normalize the whitespaces. It does seem to remove the line breaks (or replace them with space), but for whatever reason it doesn't normalize them (replace a sequence of whitespaces with a single space).

The alternative would be to force an indent size of 0 (Options > Preferences, Editor > Format, "Indent", Disable "Detect indent on open", set "Indent size:" 0 ). So you would get:

Code: Select all

 <p><ph id="something123">(<wintitle>Name</wintitle> blabla
something)</ph></p>
However, this will completely ruin the legibility in Text mode. The previous solution is much better in this regard.

Regards,
Adrian

Re: How to Get Text to not Wrap in Text Editor Mode

Posted: Tue Apr 04, 2017 4:27 pm
by ckabstein
OK. Thanks, Adrian!

Christina

Re: How to Get Text to not Wrap in Text Editor Mode

Posted: Tue Apr 04, 2017 4:52 pm
by adrian
Hi,

If you have trouble reading very long lines (due to the lack of line breaks), make sure "Line wrap" is enabled in Options > Preferences, Editor > Edit Modes > Text.

Regards,
Adrian