Kill whitespace while pretty-printing

Are you missing a feature? Request its implementation here.
mhGLEIF
Posts: 43
Joined: Tue Jul 26, 2016 6:31 pm

Kill whitespace while pretty-printing

Post 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?)?
Costin
Posts: 833
Joined: Mon Dec 05, 2011 6:04 pm

Re: Kill whitespace while pretty-printing

Post 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
Costin Sandoi
oXygen XML Editor and Author Support
Post Reply