Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Option "Ensure Single Trailing Newline" has two functions and should be split out #146

Open
draeath opened this issue Jan 23, 2017 · 1 comment

Comments

@draeath
Copy link

draeath commented Jan 23, 2017

The option "Ensure Single Trailing Newline" should be split out into two unique settings, one that ensures a file has a trailing newline (as is common with unix text files), and one that collapses multiple EOF newlines down. The latter would require the former being enabled.

Atom (with this package) is the only code/text editor that I know of that exhibits the behavior of collapsing EOF newlines, and there appears to be no way to disable this without also removing the insurance of a trailing newline (as some software is unhappy with configuration files that lack one).

See also discussion in #10.

I do understand the rationale behind it, and agree that it's good in general. However, there are some cases where it's a bother, which is why it ideally would be optional (especially for specific grammar, as the current combined setting is capable). Personally, I use multiple line spaces to visually distinguish areas of a file I'm working on from each other, and I often leave a trailing section with the intent to add more below it. I also cleanup/remove these before committing anything (when I work with source control, which isn't very often). This... doesn't work so well in Atom.

@Salamandar
Copy link

+1
I "like"/accept when my file ends up with multiple lines, but not when it does not end with endline.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants