3 ms·
> Or format in general? I use the workaround of Command-A, command-X, command-V aka “Select All, Cut, Paste”. Unfortunately that loses cursor position in the
by Someone 3y ago
> Or format in general?
I use the workaround of Command-A, command-X, command-V aka “Select All, Cut, Paste”.
Unfortunately that loses cursor position in the file and gives you a free newline at the end of your content.
- noSyncCloud 3y agoYou're supposed to end your document with a newline. That's a POSIX standard.
- Someone 3y agoI know, but if your file already ends in one, it adds a second one, if it already ends in two, it adds a third one, etc.
- mdaniel 3y agoI don't mean this as snark, I'm genuinely interested: do you have a phrase I can search for or a link to that? I don't think I've ever heard that before but I would love to start citing it
- andoma 3y agoMe too. Feels like I have an uphill battle with this at $dayjob. Would be nice with some ammo for the showdowns.
- Someone 3y agoBecause otherwise, files can contain characters that aren’t on any of its lines. https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1...: “3.206 Line A sequence of zero or more non- <newline> characters plus a terminating <newline> character.” That’s consistent with: > echo test | wc 1 1 5 > echo -n test | wc 0 1 4