Re: [code] Max file size in TextAdept

From: Mitchell <>
Date: Thu, 26 Apr 2018 17:04:51 -0400 (EDT)

Hi Randy,

On Thu, 26 Apr 2018, wrote:

> I'm thinking of starting to use TextAdept primarily with the idea that I might
> write a lexer for the markup language I use (a mixture of TWiki makrup
> language, an mbox header, and some of my own extensions) easier in Lua than in
> C/C++ as would be required for Scintilla (without Scinttilua, although I
> understand that will (or may have already) become part of the LTS release of
> Scintilla, and maybe eventually the "main line" version.
> (I get paid extra for writing long, run-on sentences. ;-)
> I have two questions:
> * I tend to work with some of what I consider large files, currently some
> ranging from 30 to 60 MB. I haven't really found a file size limit /
> specification for TextAdept, but I have seen words to the effect that it is
> intended for "smaller files". Does anybody (on this list) have experience with
> files in the 30 to 60 MB size range?

I think you're just going to have to try and see if editing files of that size works for you. The language I used was intended to construe that you cannot throw GB log files at Textadept and expect it to handle them well. Textadept excels at editing source code. Anything else is on a case-by-case basis.

I will note that ever since Scintilla enabled background lexing, I've noticed snappier performance with large-ish files. For example, a 10MB xml file opens immediately and I can jump to the end without any lag (the lexing comes in later though). Typing is also responsive.

> * I may ask more about this next point later, but I store multiple
> "records" in an mbox file, and need to fold based on a multiline header
> starting with the typical "From " line. I'm hoping that will be reasonably
> easy to do in Lua, and note that I probably specifically don't want to set the
> option which seems to restrict lexing to one line at a time.

You should be able to write a custom folding function that handles this case without too much trouble, and it can be without the lex-by-line setting if you wish. I don't have any examples to point you towards though. You'll just have to appeal to the documentation and perhaps look at *lexer.lua*'s `fold()` function for guidance.


You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Thu 26 Apr 2018 - 17:04:51 EDT

This archive was generated by hypermail 2.2.0 : Fri 27 Apr 2018 - 06:36:21 EDT