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

yi does not insert a newline on save #1104

Open
chessai opened this issue Dec 3, 2018 · 3 comments
Open

yi does not insert a newline on save #1104

chessai opened this issue Dec 3, 2018 · 3 comments

Comments

@chessai
Copy link

chessai commented Dec 3, 2018

this is a pretty common feature of text editors, it makes sure that a lot of common tools such as cat behave properly. I know i can configure this myself, but i feel like this should probably be the default.

@Fuuzetsu
Copy link
Member

Fuuzetsu commented Dec 4, 2018

Is it a default on any editor? Pretty sure emacs doesn't do this unless you set it up.

@chessai
Copy link
Author

chessai commented Dec 4, 2018 via email

@kirelagin
Copy link

According to POSIX, a text file is “a file that contains characters organized into zero or more lines. <...>” and a line is “a sequence of zero or more non- <newline> characters plus a terminating <newline> character.”

Thus, the reason many (most?) text editors (at least, traditionally, on UNIX, but not so much on Windows) always make sure that the file they save ends with a newline, is that otherwise it would not qualify as a text file.

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

No branches or pull requests

3 participants