I'm looking for an editor - not an IDE - that has just syntax highlighting. Word completion would be nice for the keywords I specify as well, but I could give up that feature. It only needs to be Windows compatible.
The situation is that I have an extremely narrow domain specific language that only has around 25 keywords; it doesn't even have conditionals. I would like the keywords to be highlighted so that the user knows when they've written a keyword correctly. And to help ensure that they don't need to specifically memorize each keyword, that's where word-completion would be nice.
I'm going under the assumption that the user has the computer skills of your typical grandparent -- I've easily made syntax files for this DSL in Vim and PSPad, but I feel that those have way too many features to be "usable" for this target audience. The functionality of Notepad (plus coloring) would be just about adequate.
I'm also open to writing a simple editor from scratch, if there is a library that already does most of the work I've explained here - i.e. I just tell it what to highlight in what color, possibly using regular expressions.
Updates: I've looked at SciTE a bit -- it is very much like what I'm looking for, except that creating the new syntax file (properties file) is becoming quite a hassle. My syntax is rather simple: a short sample script might have the form of:
CommandA
CommandB Num1 Num2
CommandC
It doesn't quite fit into Python or a Basic language, but I'm not going to write a lexer for it either. But the simplicity of SciTE and its ability to run external programs with the file are two high points.
Notepad++ is decent too -- I think it's a bit too full-featured for the intended purpose, but that's not too bad in itself. I had already tried setting up a syntax file for it, but I'm having a couple issues that just shouldn't even pop up. For example, I've chosen a color for the number style. If I put the number 3, it shows up fine. If I put 3.0, the .0 part is in the default color, not the number color. If I do 0x80, only the first zero is colored, let alone the x80; so of course 0xff isn't colored right either. Also, #
is my line-comment character. If I have a line such as
# foo bar
the whole line is blue, which is proper. But if there isn't a space (#foo bar
), then the whole line stays black. My last gripe is that auto-completion seems to only pick up on words already used in the file, not the keywords that haven't been used yet.
Am I missing something obvious with the syntax configuration here? I've had poor luck searching Google for what I think should be obvious answers in regards to Notepad++ syntax.