Micro should have an option for automatically adding a newline to file on save.
Version: 1.1.1
Commit hash: b09093f
OS: macOS 10.12.0
Terminal: hyper
What if you don't want a new line for some reason though?
@onodera-punpun Wouldn't a boolean value toggle whether it should be inserted or not though? As-is, there is no way of enabling it. Happy for it to be false by default.
Micro should have an option for automatically adding a newline to file on save.
Why?
This seems to be in the posix standard and is quite common in other editors.
StackOverflow answer on that topic:
http://stackoverflow.com/a/729795/3700391
Still look like some legacy to me.
That's why some programs have problems processing the last line of a file if it isn't newline terminated.
Seems like a bad standard if it creates problems like this.
when displaying the file on the command line (e.g. via more), a newline-terminated file results in a correct display.
Shouldn't it be the job of shell like bash to cleanup screen, environment and error codes after child process exits?
@techtonik: If the goal is to offer micro as an alternative to, say, vi, vim, joe, nano, emacs or perhaps atom and/or sublime text -- I think exposing this option is a good idea. If you want to make micro opinionated - then I think leaving the option out is the right path.
well, that was quick :) thanks much, @zyedidia.
Most helpful comment
@techtonik: If the goal is to offer micro as an alternative to, say,
vi,vim,joe,nano,emacsor perhapsatomand/orsublime text-- I think exposing this option is a good idea. If you want to makemicroopinionated - then I think leaving the option out is the right path.