News for hackers. Stuff that matters.
Re:A lightweight, simple, fast, feature-filled, text editor ... by vbezhenar on Tuesday December 27, 2022 @04:18PM (#34153951)
Can someone suggest an editor for macOS with smart text algorithms to allow work on unlimited file size or line length? I need to view unlimited text, switch between encodings (including hex) and I want editor with proper algorithms, so it'll work instantly and without loading entire file in the memory. Should support search with fast regex engine.

Editing would be nice too. I imagine editing as a sequence of actions that editor remembers and can undo/redo (including search/replace) and saving is actually applying that sequence of actions to the original file in some smart way.

Also I want it to start instantly, so I can use it as my general text file editor.

Colours, autocompletions and other nonsense is strictly not needed. Just black text on white background.

All those editors just die when I'm trying to edit a simple file of several hundreds GBs with lines of several GBs.

Re:A lightweight, simple, fast, feature-filled, text editor ... by globalnode on Tuesday December 27, 2022 @04:28PM (#34154085)
I'd also love something that works in this situation. I've been contemplating writing something that does this for a while now but it would take a fair bit of work for the fringe cases where I'd actually need it, so it hasnt been written yet :(
Re:A lightweight, simple, fast, feature-filled, text editor ... by taf2 on Tuesday December 27, 2022 @04:35PM (#34154181)
Does vi maybe help in this case?
Re:A lightweight, simple, fast, feature-filled, text editor ... by xrayarx on Tuesday December 27, 2022 @04:25PM (#34154048)
I would suggest to post your question as a „ask hn“. More people would see your questions this way
Re:A lightweight, simple, fast, feature-filled, text editor ... by generalizations on Tuesday December 27, 2022 @04:35PM (#34154172)
There's been a lot of Ask HN's recently. It'd be nice to have fewer.
Re:A lightweight, simple, fast, feature-filled, text editor ... by spicybright on Tuesday December 27, 2022 @05:22PM (#34154661)
I would like that too. I'm sure lots of posters will have excellent suggestions.
Re:A lightweight, simple, fast, feature-filled, text editor ... by acdibble on Tuesday December 27, 2022 @04:52PM (#34154354)
HexFiend (https://hexfiend.com/) works well for files of enormous size but is only a hex editor.
Re:A lightweight, simple, fast, feature-filled, text editor ... by foresto on Tuesday December 27, 2022 @04:59PM (#34154440)
It has been so long since I last used an editor that could handle very large files or long lines, that I'm struggling to remember one. Maybe SlickEdit? The Forte Agent newsreader?

The Scintilla editor widget is the cross-platform core of several good code editors, but I don't think it qualifies in this area.

I hope someone chimes in with an answer on any OS.

Re:A lightweight, simple, fast, feature-filled, text editor ... by kenferry on Tuesday December 27, 2022 @05:00PM (#34154445)
You want BBEdit
Re:A lightweight, simple, fast, feature-filled, text editor ... by KerrAvon on Tuesday December 27, 2022 @07:24PM (#34155857)
Ken is correct. IIRC, the very first version of BBEdit back in 1991(?) could handle files significantly larger than memory (on a system without memory mapping, no less).
Re:A lightweight, simple, fast, feature-filled, text editor ... by vbezhenar on Tuesday December 27, 2022 @08:15PM (#34156294)
I just opened 1.5GB binary file and it ate 2.5GB RAM according to Activity Monitor.

I tried to open 20GB single line text file and it started to eat RAM. I killed it at 60GB as I only have 64GB RAM.

So at least modern version does not seem to work well with big files.

vim does not seem to work either.

Re:A lightweight, simple, fast, feature-filled, text editor ... by HaroldPD on Tuesday December 27, 2022 @06:10PM (#34155147)
Epsilon https://www.lugaru.com/

Comes sufficiently close to be worth testing the free trial.

I don't know the file size limit, but it handles multi-GB files.

Does not fulfil the hex requirement. Recognizes and edits binary files but is not a hex editor. The previously suggested https://hexfiend.com/ looks better for that.

Unlimited line length, and can either horizontally scroll long lines or wrap them for display purposes.

Fast regex.

Unlimited undo/redo, including search/replace.

Re:A lightweight, simple, fast, feature-filled, text editor ... by 323 on Tuesday December 27, 2022 @06:14PM (#34155195)
UltraEdit

> UltraEdit's file handling is designed to prevent it from using all the available memory, which would stop other applications from running. What does this mean to you? UltraEdit has no real limit on file size - and can easily open, edit, and save large text files in excess of 4 GB!

https://www.ultraedit.com/support/tutorials-power-tips/ultra...

Re:A lightweight, simple, fast, feature-filled, text editor ... by xrayarx on Wednesday December 28, 2022 @01:33AM (#34158119)
I‘d use vim. It’s already preinstalled. For this usecase you should also consider the various command line utilities like sed, awk, grep