Changing command-char removes highlight of the command line in DrRacket
#103
Closed
opened 9 years ago by gregid
·
7 comments
Loading…
Reference in New Issue
There is no content yet.
Delete Branch '%!s(<nil>)'
Deleting a branch is permanent. It CANNOT be undone. Continue?
If you change command-char to anything other than lozenge DrRacket drops the highlight of command lines (or rather doesn't apply highlighting to new command-char).
Also please consider alternative default command-char for those stuck with Windows (or even Linux) as the idea of using character not even on the keyboard is somewhat discouraging for users (especially with no highlight) - it was for me until I finally ended up with AutoHotKey to get the character. How about simple "^" ie:
and
It seems like a logical choice as it brings to mind: "look up" and it still looks like a half of the lozenge ;)
True. Not sure what to do about it. Even if I could get DrRacket to see the custom command character, AFAIK DrRacket caches the language settings for a whole session. Meaning, if you switched between Pollen source files with different command characters, the syntax highlighting wouldn’t follow.
Any plain text can be valid Pollen source code, so there are annoying consequences to using an ASCII command character. For instance, you couldn’t easily move text into or out of Pollen from other places (because you'd have to escape / unescape the ASCII command character). Whereas once you have a way of typing the lozenge, you can use it forever. In other words, instead of a permanent, incurable wart in the system design, I’ve opted for a temporary, curable one. (While you’re at it, you can figure out the
λ
character too)Here’s an AutoHotkey script for Windows.
I will research this a bit more based on the advice above.
After further investigation, this isn’t going to work. Sorry. DrRacket’s syntax coloring has constraints.
Thanks for trying. If you don't mind reading alternative idea - to make a more pleasant experience for a newcomer to Pollen (ie: to allow a newcomer to jump right in - instead of figuring out stuff like AutoHotKey and/or changing command-char before first proper use) I would suggest extending DrRacket, Insert menu to be exact. Similarly to existing "Insert λ Ctl+" add "Insert ◊ (some shortcut)".
IMHO that would resolve majority of lozenge averse doubts about the choice made for the command-char.
If you are not interested in this direction I may try to write the extension myself in few months time - after learning a bit more about language and its IDE (DrRacket). Your project (Pollen) was one of the reasons I decided to give Racket a try - so thank you for your hard work!
Sure: it is now issue #104.
I welcome suggestions for improvement.
After further further investigation, I came up with a way of doing this. The DrRacket syntax colorer will now correctly colorize a custom Pollen command character.
Keep in mind that DrRacket only reads this character once when you open a source file. Thus, if you go to "pollen.rkt" and alter the custom command character during a session, you won't see it reflected in the syntax coloring until you close and reopen the affected source files.