简体   繁体   中英

Customize the C++ scintilla lexer

Where can I tell scintilla to recognize different keyword sets ? I want to color them differently, just like notepad++ does.

使用SCI_SETKEYWORDS

Well scintilla behaviours are quite hard-coded, so it's quite delicate to tweak a lexer. I gave up using Qscintilla or scintilla, and switched to TextAdept, which use LUA to build lexers.

The mac version seemsto have some speed issues, but I guess it will be fixed (or not) when it will come as a portable .app (let us pray).

Anyways, I'm quite sad that I wasn't able to make a good C++ editor like I wanted, it seems I wanted too many features that existing libs can offer but require some work, which I don't have time for. I'm quite disappointed concerning scintilla, it's a good lib, but the code looks a little bloated, I guess doing a language-agnostic lexer and subclass it would seem like a better idea, but I won't try to redesign what has already been done.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM