Page 1 of 1

Kill whitespace while pretty-printing

Posted: Thu Mar 16, 2017 11:21 am
by mhGLEIF
I edit a lot of XML schemas and these need to be formatted and indented for presentation in docs.

One thing that CTRL+SHIFT+P doesn't seem to do is remove any useless blank lines between XML elements.

Could this be added? Maybe as a separate operation if people like whitespace between elements (I don't think it's significant though, is it?)?

Re: Kill whitespace while pretty-printing

Posted: Thu Mar 16, 2017 12:02 pm
by Costin
Hi mhGLEIF.

Actually the format and indent action can remove the blank lines between XML elements.
The thing is that, by default, the action is set to preserve those lines as they are.

However, in order to have them removed by pretty printing the document with CTRL+SHIFT+P, you should go into the oXygen menu to:
Options > Preferences > Editor > Format > XML and disable the "Preserve empty lines" option (uncheck the box in front of it) and apply the changes.

Regards,
Costin