Re: [code] Extremely long lines in textadept source code

From: Mitchell <m.att.foicica.com>
Date: Sun, 14 Feb 2016 18:38:56 -0500 (EST)

Hi,

On Sun, 14 Feb 2016, Robert Gieseke wrote:

> Hi,
>
> Am 14/02/16 um 04:33 schrieb Markus F.X.J. Oberhumer:
>>>> E.g., there is a line in modules/textadept/file_types.lua which
>>>> has over 4500 chars.
>>>>
>>>> What's the reason for this?
>>>
>>> A combination of faster load times (from a startup perspective; less text for
>>> Lua to parse), reduction of file size (less whitespace), and reduction of line
>>> count.
>>
>> is Wikipedia right with your 2000/4000 LOC limit?
>> Let's move the table to scintillua then ;-)
>
> It's also written on Textadept's home page and Mitchell has confirmed
> these limits in list discussions.
>
> I think they can't be put into Scintillua as they are connected to
> Textadept's filetype detection and run/compile (long lines in run.lua as
> well) infrastructure I think.

Correct, it would still need to be in Textadept.

> However, I doubt that it's possible to measure a startup speed
> difference (as Textadept is quite fast at starting up), so maybe these
> could be moved to a config file which is not counted in the line count,
> thus improving readability?

Originally file extensions were defined in a separate file
(file_types.conf I think), but that was moved into pure Lua in order to
increase startup speed.

As far as readibility, there are two options (I use either, depending on
the situation): turn on word wrap, or search and replace ',' with ',\n'
and then reverse the replacement when done editing.

Cheers,
Mitchell

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Sun 14 Feb 2016 - 18:38:56 EST

This archive was generated by hypermail 2.2.0 : Mon 15 Feb 2016 - 06:48:20 EST