Notepad++
Sergey Gromov
snake.scaly at gmail.com
Wed Aug 12 13:20:17 PDT 2009
Wed, 12 Aug 2009 18:12:41 +0100, Stewart Gordon wrote:
> What's the best anybody's managed to get Notepad++ to syntax-highlight
> D? (I'm on version 5.4.5, if that makes a difference.)
>
> My userDefineLang.xml file is as given here
> http://www.prowiki.org/wiki4d/wiki.cgi?EditorSupport/NotepadPlus
> (note that I've fixed a few errors I've no idea how got there).
>
> Notepad++ does a good job of syntax-highlighting PHP files, whose
> syntactic structure is more complex than that of D. So clearly,
> Notepad++ is a powerful syntax-highlighter (or Scintilla is, whatever).
> However, at the moment I can't even seem to get it up to C standard!
> (Can anybody find a full reference of the userDefineLang.xml format, for
> that matter?)
Scintilla uses plugins to highlight source. These plugins are written
in C++ and have almost full access to the buffer so the highlighter code
may be arbitrarily complex. I actually wrote such a plugin to highlight
D a while back:
http://dsource.org/projects/scrapple/browser/trunk/scilexer
It seems like Notepad++ developers added their own highlighter plugin
which takes userDefineLang.xml as its configuration. Such a
configurable plugin is presumably much less flexible than pure C++
implementation for a particular language. It's very likely that PHP
highlighter is written in C++ and comes bundled with Scintilla.
More information about the Digitalmars-d
mailing list