Editing large files on Mac OS X

MacosEditor

Macos Problem Overview


Does anyone have any recommendations for a programmer's editor that can cope with large files on Mac OS X? By large I mean hundreds of megabytes. TextMate doesn't cut it.

Macos Solutions


Solution 1 - Macos

Have you tried Vim? It's the only editor I use :-)

Edit: It seems to depend upon a couple of factors. I used Vim with large CSV (i.e. text-based) files and that worked great. YMMV :-)

Solution 2 - Macos

If, as you say, only really need to get an idea of the structure try opening the document in Console. Believe it or not, I'm able to view files as large as 15GB (MAC OSX 10.7.2)

Solution 3 - Macos

HexFiend is designed to read files of any size, but you'll need to work using fixed-column character wrapping and no newline detection.

Solution 4 - Macos

If you just want to have an idea of structure, how about browsing with more or less?

Solution 5 - Macos

Definitely vim is the answer. Check out the macvim, the mac version.

Solution 6 - Macos

BBEdit, that old standby, is famous for handling really large files with aplomb (or, at least, it was back in the pre-TextMate era). There's a free version, TextWranger; I assume it's based on the same core and should still work.

Solution 7 - Macos

I have used gvim for files larger than 1 GB of http://en.wikipedia.org/wiki/NASTRAN" >NASTRAN output. gvim handles large files very well. In fact that was the main reason I switched from Emacs to vim.

Emacs is a great editor but it can handle files only as large as 128 MB, at least the 32-bit version. If you decide to use Emacs I recommend to configure it to turn syntax highlighting off for large files.

Another way to deal with large files those days was heavy usage of head, tail and split.

Solution 8 - Macos

Vim has already been recommended. If you're using vim you might want to also use the http://www.vim.org/scripts/script.php?script_id=1506">LargeFile</a> plugin (by the inimitable Charles "Dr Chip" Campbell), which automatically disables various features of vim in the interests of speed for files over 100Mb (at the default setting).

Solution 9 - Macos

The native emacs on OS X seems to be the 64-bit version now. It works like a charm on my 250MB text file.

Solution 10 - Macos

emacs, naturally, at least a 64 bit build (you can do that on OS X now, right?)

But also, these are surely generated files. Do you really need to interact with them all at once?

Solution 11 - Macos

Since you noted in a comment that it's actually an XML file and you just want to get an idea of its structure, you may want to check out Oxygen's LargeFileViewer, a helper app which is bundled with Oxygen XML Editor. (It might also come with Author, I don't know.)

Solution 12 - Macos

Crisp claims the ability to edit files of "8GB or more", but I haven't tried it.

Solution 13 - Macos

Edit: Do not use Sublime Text 2! Although it worked for me, apparently for many other users Sublime Text 2 can't handle large text files. Below is my original answer:


Sublime Text 2 for Mac 10.6.8 opened up a 200 MB file for me without any problem

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionJohn TopleyView Question on Stackoverflow
Solution 1 - MacosTopher FangioView Answer on Stackoverflow
Solution 2 - MacosBrandon BerryView Answer on Stackoverflow
Solution 3 - MacosDraxillionView Answer on Stackoverflow
Solution 4 - MacosMikeJView Answer on Stackoverflow
Solution 5 - MacosXavier GuardiolaView Answer on Stackoverflow
Solution 6 - MacosjacobianView Answer on Stackoverflow
Solution 7 - MacosLudwig WeinzierlView Answer on Stackoverflow
Solution 8 - MacosMichael DunnView Answer on Stackoverflow
Solution 9 - MacosandebaucheryView Answer on Stackoverflow
Solution 10 - MacossimonView Answer on Stackoverflow
Solution 11 - MacosAvi FlaxView Answer on Stackoverflow
Solution 12 - MacosAlex MartelliView Answer on Stackoverflow
Solution 13 - MacosgardenofwineView Answer on Stackoverflow