4 ms·
I tried to use it enough to see if I could switch to it from (neo)vim. I liked a lot of the ideas in it, and in some ways I liked it more than vim, but it was m
by thayne 5y ago
I tried to use it enough to see if I could switch to it from (neo)vim. I liked a lot of the ideas in it, and in some ways I liked it more than vim, but it was missing some functionality that I just couldn't live without. Some things could be solved by plugins that just didn't exist yet, but others, I couldn't even see a way a plugin could be implemented. In particular, there isn't any way to get a diff mode comparable to vim's.
I also don't like that it always unconditionally writes a newline at the end of files. I understand the reasoning for it, but it makes it much more difficult to use as an editor for transformed binary files (gzip, hex editor, encrypted files, etc.) or avoid adding extra whitespace to git diffs when I modify files.
- deleted 5y ago[deleted]
- stjohnswarts 5y agoI don't understand the new line thing at the end. I haven't used a utility or app in -decades- that cared about whether you have a blank final line.
- usefulcat 5y agoI think it used to be a requirement (technically) for C and C++, though probably not much any more in practice.
- xigoi 5y ago`cat`, for instance, definitely cares.
- ziml77 5y agoI just ran into an issue with that recently. The Pandas library for Python doesn't consume the last line of a CSV unless it's followed by a new line. I would say I couldn't believe that it actually made inject that newline if it wasn't in the input, but Pandas has enough other oddities that it was pretty easy to believe.
- jeffreygoesto 5y agoThe GreenHills C++ compiler does. It's a niche product, admitted.
- draxil 5y agobreaks some crontabs.
- shric 5y agoThere's a few reasons I can think of (some superficial, some significant): - Github and git will highlight a missing newline in a diff by default. - POSIX defines a line as having a newline at the end, so if you don't have a terminating new line you may have one fewer lines than you think you have [1] - If you ever want to append to a text file/source file programmatically with something like echo "something at the end" >> yourfile.txt then you'll be grateful you had the habit of ending everything with a newline. - If you use a shell that doesn't automatically add one when you do cat filename you'll end up with your prompt sitting awkwardly at the end of the file. vim, iirc, defaults to automatically adding a newline to any file without you explicitly asking for it, unless you do set noeol and set binary or, in versions newer than 7.4, set nofixendofline [1] https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1...
- thayne 5y ago> vim, iirc, defaults to automatically adding a newline to any file without you explicitly asking for it, unless you do set noeol and set binary or, in versions newer than 7.4, set nofixendofline which, IMO, is the right way to do it. In kakoune however, it isn't just the default, there is no way to turn it off.
- Someone 5y agoDo you ever do wc? It cares: > echo hello > hello > echo -n hello > hellon > wc hello hellon 1 1 6 hello 0 1 5 hellon 1 2 11 total
- 3836293648 5y agoLiterally cat
- gnubison 5y agoHave you used cat recently? [Edit: scrolled down, looks like several other people already beat me to it. Whoops.]