How to Get Text to not Wrap in Text Editor Mode

cjboorman
Posts: 37

How to Get Text to not Wrap in Text Editor Mode

Fri Oct 14, 2016 12:20 am

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.
adrian
Posts: 2391

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

Fri Oct 14, 2016 9:53 am

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
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
cjboorman
Posts: 37

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

Tue Nov 01, 2016 10:48 pm

Thanks - that worked! :D
ckabstein
Posts: 45

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

Tue Apr 04, 2017 3:35 pm

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
adrian
Posts: 2391

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

Tue Apr 04, 2017 4:12 pm

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
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
ckabstein
Posts: 45

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

Tue Apr 04, 2017 4:27 pm

OK. Thanks, Adrian!

Christina
adrian
Posts: 2391

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

Tue Apr 04, 2017 4:52 pm

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
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

Return to “DITA (Editing and Publishing DITA Content)”

Who is online

Users browsing this forum: No registered users and 1 guest