-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
insert_final_newline not respected #136
Comments
Thanks for reporting! Would you please tell us the steps you took and how you discovered this? For example, empty files should stay empty. Could you share the file you were editing, as an attachment? Much appreciated! |
|
hm, just trying to figure out why no newline inserted. similar config, neovim with editorconfig-vim. |
@istinspring Would you please tell us the steps you took that led you to discover the issue? Please attach any files you used (but no private information, please). Thanks! |
config. when you want to copy all lines in file you usually go |
hm actually there is issue already #74 so i used hexdump to look what's actually in file
and looks like there is new line already? am i right? |
Vim assumes that every text line ends with a newline. If you set |
Yes, |
The specification is clear that From the Vim docs, it looks like we need to set both |
As suggested in the last comment in editorconfig#136, this also turns off eol.
The docs are a little cryptic, but the purpose of both
Therefore:
The obnoxious kludgy way to avoid this quirk would be to hook an autocommand to |
in my case I am trying not to insert a newline but the newline is always inserted at the end of the file.
the code below is the same, the line is always inserted:
|
EDIT: I had enabled
The relevant section of the vim help for 'endofline'
|
While reviewing this, I realized the specification is at odds with the behaviour being implemented in this PR. I have opened editorconfig/editorconfig#475 to clarify the specification. |
When editing a file with the following .editorconfig loaded:
no final newline is inserted.
The text was updated successfully, but these errors were encountered: