It would be cool, if nbgv set-version would respect insert_final_newline = true. 馃槈
Yes, and tabs vs. Spaces and indent size too.
Any idea of a library that would help with adding such a feature?
As someone who HATES empty lines at the end of a file in my own code, can I ask you guys why you feel one is necessary (not specifically here, just in general)?
That's a good explanation why I want it too:
https://stackoverflow.com/a/729795
In short: Because of the POSIX standard
@yannduran for me, it's because of the scc diffs that show up later. I like trailing newlines so that adding another line doesn't have to _change_ the last line as well as add the new one. I just want to add the new one.
That's also why I add trailing commas to lists where each item is on its own line.
@AArnott thanks for that explanation! Makes sense from a source control point of view.
I have to admit, I do add a new line for files that I know might have something added after the current last line (mainly for making copy/pasting another line easier), but for files containing things like classes, enums, interfaces etc that will never have anything added after the final } I religiously get rid of them.
Just a personal quirk I guess.
I've seen people having a trailing command for things. I didn't even think that'd be legal code, but it still compiles.
Most helpful comment
@yannduran for me, it's because of the scc diffs that show up later. I like trailing newlines so that adding another line doesn't have to _change_ the last line as well as add the new one. I just want to add the new one.
That's also why I add trailing commas to lists where each item is on its own line.