Hi! I wrote a small editor for another project that uses Scintilla with a custom lexer as editor component. Everything, including the lexer (styling and folding) is written in AutoIt in a way that it can be easily integrated into other projects. The archive contains everything neccessary: the compiled editor, complete source code, form definitions, external libraries, etc.. Certainly, everything written by someone else is documented, either in authors.txt in the "Libs" folder or as comments in the source itself. The lexer is mainly designed to be used with script languages (SGML-like languages won't work really well) and can be customized via its own menu item. You can add your own additional script language definitions as well. There are already some lexer definitions, test scripts and a small example, how to integrate the editor component into a different project (mainly only 4 lines of code) in the archive. See _LexingUDF_example.au3. When you start the editor it runs in german without any default lexer selected, so if you would like to start in english and with AutoIt lexing enabled, call it this way: 'scripteditor.exe -l=en -x=autoit' Apart from that you can go to 'Lexer' menu and choose one from the list. You can take a look at every command line parameter with '-h' Screenshot (ok, in german, yet I think you will understand): Download: ScriptEditor v1.9 A short description how to integrate the component into another project (for a closer look, see _LexingUDF_example.au3): ; 0.) we need the whole content of the archive, so extract everything, delete editor.au3 and start coding ;-) #include "_LexingUDF.au3" ; at first the parent GUI needs to be created, we need the control id (in this example $hGUI) ; 1.) now set the parent GUI for the new editor component $__default_editor_parent = $hGUI ; 2.) load a lexer definition - name of the file without .def extension from 'LexDef' folder _GUICtrlLex_ReadLEXFile($lexer) -> ie: _GUICtrlLex_ReadLEXFile("autoit") ; 3.) create editor component within $__default_editor_parent _GUICtrlLex_CreateScriptEditor($x, $y, $width, $height) -> ie: _GUICtrlLex_CreateScriptEditor(0, 0, 800, 600) ; 4.) initialize necessary variables, arrays, etc. and apply the styles, layout defaults, marker definitions, etc. which have been loaded before to the editor _GUICtrlLex_SetupStylingAndFolding() ; this is it.... for everyone who wants to have a nice menu with every existing lexer definition and a ; menu point to customize things, as shown in the screenshot, adds the following: ; (advice: use OnEvent mode to ease things) ; 5.) create a separate 'Lexer' main menu entry with everthing needed _GUICtrlLex_CreateLexerDefMenu('main') ; 6.) connect the menu item created in 5.) with the configuration dialog GUICtrlSetOnEvent($__arM[2], "_GUICtrlLex_OpenLexerDef") ; IMPORTANT: if you need to register your own WM_COMMAND or WM_NOTIFY routines, use ; _GUIRegisterMsg from _GUIRegisterMsg.au3 !!!   Really nice is that you can change the lexer definition, colors, fonts, etc. and if you click on 'Save' everything will be applied immediately so that you can see what happens. Try it with the test scripts ;-) To be fair, I have to admit, that the editor is too slow for big scripts -  it's running in AutoIt speed    . But as speed wasn't important for me, because I wanted to handle small scripts with my own special lexing, it was ok for me. So please don't blame me for the fact, that your 8000 lines of code script won't get styled and folded really fast ;-) Also, there might be still some bugs in it and I don't really know how smart my way of coding is (especially the folding algorithm , perhaps a rewrite it from scratch), because I'm still quite new to AutoIt, but it was fun to do ;-) and it works for me. Perhaps someone likes it , it is meant as a contribution to a very informative forum ! Regards, Holger