Hi,

Does anybody else see the problem here?

-------------------------------------
$ ls -ogh synhigh*
-rw-r--r-- 1  37K 2010-01-18 14:37 synhighlighterany.pas
-rw-r--r-- 1  50K 2010-01-18 14:37 synhighlightercpp.pp
-rw-r--r-- 1  44K 2010-01-18 14:37 synhighlightercss.pas
-rw-r--r-- 1 8.3K 2010-01-18 14:37 synhighlighterhashentries.pas
-rw-r--r-- 1  58K 2010-01-18 14:37 synhighlighterhtml.pp
-rw-r--r-- 1  40K 2010-01-18 14:37 synhighlighterjava.pas
-rw-r--r-- 1  65K 2010-01-18 14:37 synhighlighterjscript.pas
-rw-r--r-- 1  23K 2010-02-04 10:00 synhighlighterlfm.pas
-rw-r--r-- 1  25K 2010-01-18 14:37 synhighlightermulti.pas
-rw-r--r-- 1 115K 2010-02-04 10:03 synhighlighterpas.pp
-rw-r--r-- 1  80K 2010-01-18 14:37 synhighlighterperl.pas
-rw-r--r-- 1  39K 2010-01-18 14:37 synhighlighterphp.pas
-rw-r--r-- 1  12K 2010-01-18 14:37 synhighlighterposition.pas
-rw-r--r-- 1  33K 2010-01-18 14:37 synhighlighterpython.pas
-rw-r--r-- 1  79K 2010-01-18 14:37 synhighlightersql.pas
-rw-r--r-- 1  13K 2010-01-18 14:37 synhighlightertex.pas
-rw-r--r-- 1  23K 2010-01-18 14:37 synhighlighterunixshellscript.pas
-rw-r--r-- 1  41K 2010-01-18 14:37 synhighlightervb.pas
-rw-r--r-- 1  38K 2010-02-04 10:00 synhighlighterxml.pas
-------------------------------------

Note the file sizes. 115K for Pascal syntax highlighting, 79K for SQL, 44K
for CSS, 38K for XML etc.  This is crazy!!!  I couldn't find any other
editor (that also supports syntax highlighting) with such large files. Also
most other editors support external config files loaded at runtime.

Why can a javascript file of 1930 bytes do syntax highlighting for Delphi,
2447bytes for SQL, 1977 bytes for XML etc..  Why is syntax highlighting in
SynEdit so HUGE and overly complex?

I wanted to add a new syntax highlighter for IPF documents (markup file
used to create INF help files) inside Lazarus IDE. I simply got lost in the
complexity of SynEdit. Switched to MSEide which uses external text files
loaded at runtime, and 10 minutes later I had a working syntax highlighter
(all written without documentation - just trial and error).

Doesn't SynEdit support something like an external text based config file
per file format? Most editor do. For example gEdit (default Gnome editor)
includes stacks of such files - all in XML format and uses regular
expressions to find language syntax. Not to mention gEdit's Pascal syntax
file is 1/16th the size of SynEdit's. That's 7K vs 115K!



Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://opensoft.homeip.net/fpgui/


--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to