editorconfig-notepad-plus-plus icon indicating copy to clipboard operation
editorconfig-notepad-plus-plus copied to clipboard

end_of_line fails to override automatic line ending detection

Open ronww opened this issue 1 year ago • 8 comments

When editing files containing mixed line endings, EditorConfig's end_of_line setting fails to override the auto-detected line ending. See attached screen clipping. CrCrLfText

ronww avatar Apr 03 '24 16:04 ronww

The alternative would be to saving the file with a different line ending, but I think the current approach is less intrusive.

xuhdev avatar Jun 07 '25 18:06 xuhdev

Saving the file with changed line endings creates an unreasonably large diff that my co-workers would have to trudge through reviewing code changes.

editorconfig presents the ability to specify the line ending, so it should do that. If Notepad++ is preventing editorconfig from doing this, then I will know to file a bug report with that project (with link to this report).

ronww avatar Jun 08 '25 17:06 ronww

(Forget what I said above)

If I remember correctly, the plugin always saves the whole file with the specified EOL, because there was no way to only change new lines, at least at the time of implementation (2012ish).

xuhdev avatar Jun 09 '25 08:06 xuhdev

(I'm sorry. Has been over a year)

These files were log files created by an client test framework that my (now former) client uses. The client was complaining that the log files were not displaying correctly in Notepad++. While I was able to provide a tool to fix the log files, the client refused to use it, insisting it should not be necessary.

I was able to convince them to use the editorconfig plug in, but it failed to work as advertised.

Anyway, my point (and theirs) is that the feature is not working correctly, whether it because of a bug in editorconfig or a bug in Notepad++.

ronww avatar Jun 09 '25 14:06 ronww

@ronww I'm really sorry about your situation with your client, but this is a common limitation imposed by many editors. The spec is also vague about it, so that plugins may work with the limitations imposed by their editors.

xuhdev avatar Jun 11 '25 01:06 xuhdev

So, the problem is that Notepad++ is not accepting the EOL setting from editorconfig?

If that is the case, I will file a report wit the project, referring to this report.

ronww avatar Jun 11 '25 21:06 ronww

EditorConfig Notepad++ should save with the specified EOL. it can't (at least couldn't) just change the endings of newly inserted lines.

xuhdev avatar Jun 14 '25 22:06 xuhdev

I don't understand what you are saying.

As shown in the screen snip I included in this ticket, editorconfig did save the end_of_line setting I specified.

What is not happening is the end_of_line setting is not overriding the auto-detecting line ending in Notepad++

If this is caused by Notepad++, I will file a report with the Notepad++ project.

Otherwise, please fix this in editorconfig

Thank you

ronww avatar Jun 16 '25 20:06 ronww