Hi guys. So after a long surch for an editor with some more modern features (unicode, powerful syntax highlighting, etc...) I've found the only one that can match the actual text editing capabilities of Crimson is sadly only available on OS X. Looks like I'm stuck with Crimson for a while yet.
So I guess it falls on me to make my most desperate feature additions. I can't really find a place where new features can be discussed accepted/rejected, who are the developers that make the final call or what the process is. However I'd like to get some feedback before putting in effort into patches.
I'll post my stuff in the forum to start with, not really sure if the bug tracker is a better place for this, let me know and I can dump it in there instead if that's that case.
So here's the first round of additions in mind: I've found Crimson syntax highlighting is almost adequate for Python, but leaves Ruby looking like a desolate wasteland. Which of course is quite unacceptable
I've played around with the source and so far have made the following alterations:
- Added two additional variable types (they're really a duplication of what's already there). This is useful in Ruby where not only do you have global variables (eg: $1
), but also class and instance scoped attributes (@@class_variable
), and symbols (:symbol
). Note: There's another syntax for symbols made from strings (:'symbol with whitespace') but it's rarer and I can live without it until I get desperate
- For generality the variable options in the SPC file are now: $VARIABLEnPREFIX, $VARIABLEnENCLOSEDBY, $SPECIALVARIABLEnCHARS with n = 1-3 . I've kept the old style numberless options so we don't break all the already present syntax files.
- The addition of symbol type of variables will of course clash in Ruby with namespace qualifiers (like Mod::Klass
, is :: a namespace qualifier or is :Klass a symbol?), so I've extended each variable type with the option $VARIABLEnNOTAFTERCHARS. This fixes the namespace problem.
- Added regular expressions. They're just like strings but get their own colouring scheme. Unfortunately there will be a conflict in languages that use / as an operator, and // to delimit regular expressions. I'm working on this problem now but that'll be left for a future patch. This is going to require some tweaks to the syntax engine for a reasonably general fix.
- Still need to update documentation to reflect syntax file additions.
Some other additions, as of a couple days ago I'm finding the docstrings generated by some fellow developers in Python break. For example this becomes confused: '''Hello, it's a lovely day.'''
So I think the best way I can fix this is with:
- Change string quote specification from a single character to a string of characters. That way we can define ''' as a string quote.
- Add a fourth string quote type, since python allows: '
That's all from me for now. Love to get some feedback so I can start on getting those patches in.