Comment by brynjolf

11 years ago

I had a 4gb textfile I wanted to open. Vim choked while Scite handled it like it was no big deal. Later I configured vim to handle it okay but Scite still is there in my toolbox if I need it.

> I had a 4gb textfile ...

A few years ago I had to research text editors designed to handle files >200 MB. Vim, which I love, wasn't up to the job. Here's what I found (sorry, I don't seem to have the links at my fingertips; also this is partly based on 4-year old memories):

----

* EmEditor: This was very impressive. The speed is breathtaking for what it does, and it can handle advanced functions such as column operations on the full file with ease. We chose this and users were very happy; it transformed their abilty to work with large text files.

----

THese were on our shortlist to test next but we didn't get to them due to available time and EmEditor's fantastic results:

* VEDIT: Designed for large files. They charge for it, IIRC, but based on its reputation it is worth the investment.

* The Semware Editor (TSE): Also a great reputation

* 010 Editor: http://www.sweetscape.com/010editor/

* PilotEdit: http://www.pilotedit.com/

----

Also of interest:

* File Query: Treats file as a database, enabling parsing, queries; very flexible and powerful, per reviews: http://www.agiledatasoftware.com/

* PDT-Windows: A database editor which reputedly has a max filesize of 18 EB (exabytes)

* bvi: Binary VI

----

Finally, , some excellent resources

* http://texteditors.org/cgi-bin/wiki.pl?CategoryLargeFileHand...

* http://www.knudvaneeden.com/links/file/addactivity/computer/...

Interesting. I've found Geany (UI) and the ubiquitous `less` pretty effective at handling very large files in my experience. I might try Scite out to see how it compares.

Turning off line wrapping and syntax highlighting before loading a large file seems to help enormously in Vim.

You can temporarily turn off all syntax-highlighting and line wrapping in vim by opening a file like this:

vim -u NONE big_file.txt

This works very well for very large files.

I've opened text files twice that size with vim. Unless it got much worse in the last 10 years the problem you had is that vim was trying to count how many lines are in your file, abort the operation pressing ^C and it will work fine.

On some older Unixes I've used, there was a command called bfs, for big file scanner. It could open text files in read-only mode and you could move around in them like in an editor.

  • Also, for files too large for an editor, Unix split and csplit commands can help break it into chunks; edit them, then join back with cat.