text view: breaking attributes

Having trouble installing Oxygen? Got a bug to report? Post it all here.
jbzech
Posts: 37
Joined: Fri May 20, 2011 6:07 pm

text view: breaking attributes

Post by jbzech »

This is a minor issue, but it's cause me grief: I'm working in HTML and DocBook primarily, and when I use the Indent feature to automatically clean up my XML or HTML for reading in the Text view, Oxygen adds newlines to tags with attributes. I don't want that.

In the Preferences pane, I have unchecked both "Break long attributes" and "Break line before Attributes", but Format & Indent still adds random line breaks to some (but not all) tags with attributes. How can I stop this? Am I missing another preferences setting?

Thanks for the help!
adrian
Posts: 2879
Joined: Tue May 17, 2005 4:01 pm

Re: text view: breaking attributes

Post by adrian »

Hello,

I'm afraid there isn't an option that can specifically prevent Oxygen from inserting line breaks between attributes. You could increase the line width(in Options -> Preferences -> Editor -> Format) until all your attributes fit on a single line but this will also affect how the rest of the document is formatted.

But If I may ask, why do you want to keep all the attributes on a single line?
XML-wise it makes no difference, and all the line breaks do is improve readability.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
jbzech
Posts: 37
Joined: Fri May 20, 2011 6:07 pm

Re: text view: breaking attributes

Post by jbzech »

It's just a readability issue for me, and I'm still relatively new to this stuff, so maybe its silly. But I don't like it when the attributes on my inline elements make the line break (my lines have lots of text and get long)--I like having block elements on their own lines. I know it doesn't make a difference to the processing of the file, but when I'm trying to find something, it makes it harder to scan.
adityakg
Posts: 1
Joined: Mon Feb 13, 2012 10:30 am

Re: text view: breaking attributes

Post by adityakg »

Hi,

Go to Editor > Format, and change:

"Line Width Format and Indent" to a large number (e.g. 1000 - default is 100). So, line width smaller than 1000 will not be broken to several lines.
Post Reply