insert_final_newline doesn't work #81

aharris88 opened this Issue Feb 26, 2015 · 5 comments


None yet

2 participants


One of the options for the editor config it insert_final_newline, but even though I have mine set to true, it always removes the final newline.

insert_final_newline: set to true ensure file ends with a newline when saving and false to ensure it doesn't.
maksimr commented Feb 26, 2015

@aharris88 we use js-beautify for formatting, you should use options of js-beautify.
Try end_with_newline option



Ok, but I thought it said that as of version 1.0, it also supported editorconfig, which has an option called insert_final_newline.

Is this not true? Do I have to use the options in js-beautify instead?

maksimr commented Feb 26, 2015

Partially true.

You should define js-beautify options in editorconfig it allow setup formatting per project and simple reload formatting when navigate between projects in same vim session.

We also convert some editorconfig options to js-beautify options. We can convert insert_final_newline to end_with_newline if it has same effect.



Gotcha. That would be great if you could convert insert_final_newline to end_with_newline because my team uses editorconfig and I'm the only vim user.

I believe that both options are supposed to have the same effect.

@maksimr maksimr added the enhancement label Feb 26, 2015
@maksimr maksimr closed this in 6b6b023 Feb 27, 2015
@maksimr maksimr added the tested label Feb 27, 2015

Fantastic! That works for me. Thanks for your quick response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment