tags:

views:

2671

answers:

10

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.

+11  A: 

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

Topher Fangio
If Vim can truly handle a file hundreds of megabytes in size, I tip my hat to it. I know emacs chokes on enormously large files.
Adam Rosenfield
I use it on very large log files quite often. It only loads what it needs to. Now, doing some fun data manipulation on every line may take a while ;-)
Topher Fangio
Yes it can and search and replace is amazingly fast.
Ludwig Weinzierl
Vim worked like a charm for me so thanks for the suggestion. BBEdit was choking on only a 78 MB file and VIM opened it in seconds :)
Katy
@Katy Glad it helped!
Topher Fangio
FWIW I just opened a 4GB SQL dump file in vim on my MacBook Pro. It took a minute to open, but it works...
dasil003
+3  A: 

I have used gvim for files larger than 1 GB of 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.

Ludwig Weinzierl
A: 

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?

simon
As far as I know, Emacs can only handle up to 128 MB.Not sure about 64 versions.
Ludwig Weinzierl
yes to 128mb limit on 32. I should double check this about 64 bit builds on OS X, as it is funny about 64 bit in some ways
simon
A: 

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

Alex Martelli
+4  A: 

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.

jacobian
I tried TextWrangler and it choked on the file unfortunately.
John Topley
The latest BBEdit crashed on my 4GB file. I do typically use it for hundred-meg files, but it can't handle GB size files apparently.
dasil003
+4  A: 

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

MikeJ
Very good advice: if you only need to read the content, less is even more efficient than vi.
Arthur Reutenauer
+1  A: 

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

Xavier Guardiola
+2  A: 

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

Scrod
A: 

Vim has already been recommended. If you're using vim you might want to also use the LargeFile 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).

Michael Dunn
A: 

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.)

Avi Flax