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

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.


And on emacs. I have "turn on/off syntax highlighting" as a shortcut. Specially useful for largish JSON files, for some reason emacs chokes easily on them


I like how you say "on emacs". Makes it sound like "on Windows", i.e. Emacs the OS... ;)


Well, I'm not native so on and in are somehow hard to pinpoint. Quite likely I'd have said also on vim :) (I use emacs+evil by the way)


Emacs has (or maybe had, I didn't check for a few year) a hard limit which is 512 MiB on 32 bit platforms.


Here's my list of commands for large files in Vim, but I'm no Vim guru:

    set nobackup
    set nowritebackup
    set noswapfile
Also, from the Vim Tips wiki: "Faster loading of large files" http://vim.wikia.com/wiki/VimTip611


One can turn off syntax highlighting only for long lines in vim.

    set synmaxcol=N_characters


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.


Try "joe". (Force the syntax highlighting off though. I wish they had never added it.)


Syntax highlighting was the number one most requested feature before it had it :-)


It drags things to a crawl and there's no global off switch or command line off switch. Having to edit distro provided .rc files makes me grumpy :-(


You should submit a bug for this. You can say: joe --highlight foo.c for one file, but you're right, it's not global. Maybe better to auto-disable if it finds long lines or large files.

On the other hand, I submit that JOE's highlighter is the fastest available (someone should test this- I've not done it recently).


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.




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

Search: