Make Format and indent remove spaces from blank lines?

Are you missing a feature? Request its implementation here.
RBVanDyke
Posts: 88
Joined: Wed Feb 11, 2015 11:25 pm
Location: San Francisco, California USA
Contact:

Make Format and indent remove spaces from blank lines?

Post by RBVanDyke »

For oXygen XML Editor 22.

IF I use blank lines to make a topic's structure a bit easier to navigate visually, THEN auto indentation or some other tool/process sometimes puts SPACE characters into blank lines(?)

The problem then becomes that IF a blank line contains spaces, THEN Preferences -> Editor -> Format -> Format and indent cannot be configured to remove them(?)

The result is that topic files contains blank lines with spaces that serve no purpose.

Would it be possible to add an option to Format and indent delete spaces from blank lines? This would enable one to configure oXygen's editor to behave like VSCode and other structured text editors.

Thanks,
Riley
SFO
RBVanDyke
Posts: 88
Joined: Wed Feb 11, 2015 11:25 pm
Location: San Francisco, California USA
Contact:

Re: Make Format and indent remove spaces from blank lines?

Post by RBVanDyke »

A small addition to my original suggestion.

I initially thought that auto-indent was putting SPACE characters in blank lines. That may or may not be true.

The other possible culprit seems to be pasting indented text that includes blank lines(?)

In any event, I periodically end up with blank lines that contain SPACE characters. For now I solve the problem with the REGEX find (^ +$), then leave the replace text entry area empty. Replace ALL removes the unwanted space characters from blank lines...
RBVanDyke
Posts: 88
Joined: Wed Feb 11, 2015 11:25 pm
Location: San Francisco, California USA
Contact:

Re: Make Format and indent remove spaces from blank lines?

Post by RBVanDyke »

And now that I'm thinking about it, other structured text editors such as Visual Studio Code can be configured to remove spaces from blank lines when a file is Saved. I find that behavior very convenient...
RBVanDyke
Posts: 88
Joined: Wed Feb 11, 2015 11:25 pm
Location: San Francisco, California USA
Contact:

Re: Make Format and indent remove spaces from blank lines?

Post by RBVanDyke »

A bit more info.

One use case is that oXygen XML Editor creates blank lines containing SPACE characters when pasting indented text. If there are blank lines, oXygen puts spaces into those lines ala auto-indent or the like.

As I said, I have some REGEX that deletes the vestigial spaces. But it would be much nicer if:
  • Format and indent could be configured to tidy up those sorts of blank lines.
  • Save-ing a file could, ala VSCode et alia, be configured to delete vestigial spaces.
Cheers, thanks, & hope this helps,
Riley
SFO
RBVanDyke
Posts: 88
Joined: Wed Feb 11, 2015 11:25 pm
Location: San Francisco, California USA
Contact:

Re: Make Format and indent remove spaces from blank lines?

Post by RBVanDyke »

OK so Format and Indent evidently does tidy up blank lines that contain spaces.

So maybe we should delete this entire topic. I'd delete it if I could... :)
Post Reply