Hacker News new | ask | show | jobs
by martanne 3559 days ago
Thanks for the feedback!

Yes syntax highlighting for large files is a hard issue. I'm not really aware of an accurate an high speed solution supporting editing operations in huge files.

In principle the underlying data structure used by vis supports all modifications with linear complexity in the number of editing operations since file load. This is independent of the file structure (i.e. single line files should be well supported). However the frontend code hasn't yet been optimized so in practice there might be some problems.

Unless one specifies the blackhole register when deleting large parts of a file this will create an in memory copy (to enable later pasting at a different location). Better would be to keep a reference to the existing immutable text region.

1 comments

Another thing I sometimes do:

Open a medium sized file in some format (CSV for example)

Select all

Change the selection to individual selections, one per line.

Edit in parallel, doing the same edit to all lines.

When the file is not that big, this sequence of actions is amazingly fast in ST.