Open cxw42 opened 6 years ago
FWIW The VBE isn't making this simple - it tends to arbitrarily add empty lines on import; we're already working around a VBE bug that inserts an empty line at the top of a module when importing a UserForm
. This is about arbitrary empty lines at the bottom of modules, correct?
@retailcoder traditionally that also refers to syntactically unnecessary whitespace at the end of lines
Then we're no longer talking about using the VBIDE API's Export
method at all, we're looking at an full-on rewrite of the API feature... and I think I like it. Our wrappers can do it.
We rolled our own Print command, so why not?
@Vogel612 @retailcoder Yes, I was thinking of extra whitespace at the end of lines, including whitespace on otherwise-blank lines.
I have noticed the extra bottom lines appearing on manual export, and chopping those would be a nice bonus. It would keep my vi modelines from being pushed out of detection range :) . (Edit to explain: my workaround for this in the past has been to copy a whole module into vi, do s/\s\+$//
, and then copy and paste it back into the VBE. Ugh. But that's why I care about vi modelines.)
I am using manual source control (not Rubberduck integrated control).
Rubberduck | Tools | Export Active Project
makes that very easy --- I just export into my working directory, thengit commit -a
in my terminal. I would like to request an option to remove trailing whitespace from any exported file before exporting. That would reduce spurious changes in a commit, which I have sometimes seen in the past when exporting manually. Also, I wouldn't get ugly red blocks in thegit diff
output :) .My preference would be to also modify the VBA project to remove the trailing whitespace. However, omitting trailing whitespace from the exported files, without touching the project, would also satisfy my use case.
Thanks for considering this request!
Rubberduck version: Version 2.1.1.2532 Operating System: Microsoft Windows NT 6.2.9200.0, x64