Skip to content
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 doesn't work #81

Closed
agarrharr opened this issue Feb 26, 2015 · 5 comments
Closed

insert_final_newline doesn't work #81

agarrharr opened this issue Feb 26, 2015 · 5 comments

Comments

@agarrharr
Copy link

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
Copy link
Owner

maksimr commented Feb 26, 2015

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

Thanks!

@agarrharr
Copy link
Author

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
Copy link
Owner

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.

Thanks

@agarrharr
Copy link
Author

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.

@agarrharr
Copy link
Author

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
Projects
None yet
Development

No branches or pull requests

2 participants