Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yeah but that's not a realistic usecase for most users/developers. I haven't measured if Ox is faster or slower, but for me startup time and ability to quickly open files under 10MB are more important.


> Yeah but that's not a realistic usecase for most users/developers.

It also looks like vim and emacs don't decide what a realistic use case is, or if you're "most" users/developers. They just open text files for editing.


Probably, but then we don’t use our normal editors when we want to open huge files, we use the fast ones.


I open massive files in a text editor all the time.


I also am regularly limited in opening large text files working with genetic data.


I frequently open minified CSS/JS by accident. IntelliJ's project search window includes a small preview of each result when you hover it, so when you navigate through the results your might pass through a minified file and get your IDE to hang for a couple of minutes :)


But for 10MB range do you even feel the delay for any of text editors? For me it feels instant whatever (terminal based) editor i'm using. And what does it even mean "fast" in this case. They all are definitely faster than me typing.


Is something like Emacs, Vim, or Nano genuinely slow for you?

Even for large files, I've never noticed anything beyond microsecond-type delays with those. Definitely does not feel laggy to me, usually.


It is very realistic when I copy a json dump into an editor and then do a key stroke to format it.

My beloved vim doesn't fair so we'll. VScode does very well on this.


I noticed some years ago that vim can be much slower due to highlighting of particular syntax of huge files. For example it was fine with a 10MiB C file, but super slow with a 10MiB XML file, but fast again with ":syntax off"


Are you doing the formatting via a Vim plugin?

I often find it's much faster to pipe out to a command line program to do formatting on huge files.

e.g.

   :%! jq 
or

   :%! xmllint --format -


Huh, thanks, I didn't know you could put the contents on stdin like that (%!) - just in case you (or anyone) was similarly unaware in reverse, you can also put `%` wherever you want to use the filename in the command.

i.e. I would have done:

    :! jq %
and have probably been guilty of (not knowing `%!` per above):

    :! cat % | ...


I open massive text files semi-regularly. If a text editor can't deal with that it's a big con for me.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: