The editor does, as you'd expect, edity-things. You can edit text just as a standard text control.
It does, however, have a few useful tricks up its sleeve.
For starters, automatic indentation. If you type the following DM code into Dreammaker:
a
b
...and then press Enter, Dreammaker will insert a tab at the next line - you're automatically indented to match the block you're in. DMIDE does this as well.
You can see in the screenshot that DMIDE is a tabbed editor - this is the first point of major difference from Dreammaker. Every time you open a file, you get a new tab at the top of the editor window. Clicking on a tab switches to that file. A * in the tab name indicates that the file has been modified since the last time it was saved or opened.
DMIDE does syntax highlighting, of course, like Dreammaker:
These colours will, in future, be configurable. At the moment you can change them by editing the source, but that's not exactly user friendly.
DMIDE does some tricks with the syntax highlighting that Dreammaker doesn't do. For example:
Unclosed strings get bright red highlighting so that you notice them.
If you've been paying attention, you may have noticed some circles with minus signs in them in the margin on the left. Here's an example with a few more of them:
Whatever could these do? Well, if you click on one:
And if you were to hold down ctrl-shift and click on the margin:
Code folding! You can hide blocks you're not interested in. The folding is entirely based on indent depth.
Syntax highlighting and code folding work on .dmf files, too.
The editor highlights matching brackets and parentheses. It's a subtle effect, but very useful:
Those are the principle features of the code editor. There is some other functionality - highlighting errors with red squigglies, and regex find/replace - that is in the code, but not exposed in the UI.
Future work will likely include the following:
- Exposing error-highlighting and regex find/replace to the UI
- A settings page, for adjusting the colour scheme and other features.
- Calltips and code-completion