The Dolfin editor
.dlf files open in the Dolfin editor. It checks your source as you type, completes names, explains symbols and fixes common mistakes for you.
As you type
| Feature | Behaviour |
|---|---|
| Highlighting | Keywords, names, literals and comments are coloured. Names are coloured by what they are (concept, property…), not only by syntax. |
| Diagnostics | Errors and warnings are underlined, with a marker in the gutter. Hover the underline to read the message. Hints (for example trailing spaces) are not underlined: they are listed in the Problems panel only. |
| Completion | Keywords, and the concepts and properties of the whole project. When a keyword such as date is typed where a name belongs, the escaped form `date` is offered too. |
| Hover | Hover a name to see its declaration and its description. When descriptions exist in several languages (#en>, #fr>…), the one shown follows your order in Settings → Languages. Hovering a prefix shows the IRI it expands to. |
| Indentation | Two spaces. Tab indents the selection, Shift+Tab un-indents it. |
| Comment continuation | Enter on a comment line (# ), a language-tagged comment (#en> ) or an annotation line (#@ ) starts the next line with the same prefix. Backspace right after a bare prefix removes the whole prefix. |
| Reference count | A faint line such as 3 references sits above each concept, property, rule and query declaration. It counts uses across the whole project, not the declaration itself, so 0 references flags an unused name. Click it to list the uses and jump to one. It refreshes each time the file is re-checked, and is shown in read-only files too. |
| Folding | Click the arrows in the gutter to fold a declaration, a run of annotations or a group of language-tagged comments. |
Quick fixes
When a problem has a mechanical fix, the editor offers it in two places:
- A line reading 💡 fix — click to insert above the affected block. Click it to apply the fix.
- The tooltip of the underlined text, which lists the same fix as a button.
The fix is also a button on the problem’s row in the Problems panel. A fix may edit another file, or create one: Declare concept Person in people.dlf adds the declaration to people.dlf.
Right-click menu
Right-click in the editor. What the menu shows depends on where you click.
| Item | Shown when | Action |
|---|---|---|
| ✂ Cut / ⧉ Copy | Text is selected. | Clipboard. |
| # Copy name | On a name. | Copies the name as written, for example people.Person. |
| ▢ Select word | On a name. | Selects it. |
| ▢ Select block | Inside a declaration. | Selects the whole declaration (a concept, property, fact…). |
| 🕸 Reveal in graph | On a name. | Switches the output panel to Graph, centres the node and highlights it. |
| 🐢 Reveal in turtle export | On a name, in an ordinary project. | Switches to the Turtle tab and highlights the Turtle generated for that declaration. See Reveal. |
| 🐢 Reveal in turtle source | On a name, in a project imported from Turtle. | Opens the original .ttl at the matching statement. See Reveal. |
| ⎘ Paste | Always. | Pastes the clipboard. Your browser may ask for permission first. |
| ⌖ Go to definition | On a name. | Jumps to its declaration, opening the other file if needed. Same as F12. |
| ℹ Peek info | On a name. | Shows the hover information in a popup where you clicked. Escape closes it. |
| 🔗 Find all references | On a name. | Lists every place the name is used, declaration included. Click one to go there. |
| ✎ Rename symbol | On a name. | Asks for a new name and renames the declaration and every use, in every file. |
The Go to definition, Peek info, Find all references and Rename symbol items appear once the language service has started, a second or two after the page loads.
The Turtle editor has a shorter menu.
Keyboard
The usual editing keys work: undo and redo, search and replace, bracket matching. See Keyboard shortcuts for the full list.
Editing together
When someone else has the same file open, you see their cursor and selection in their colour, labelled with their name, and their edits appear as they type. Undo only undoes your own edits. See Collaboration.
Who can edit
On a project shared with you as Viewer, the editor is read-only: you can select, copy, hover, search, reveal and go to definition, but Cut, Paste, Rename symbol and quick fixes are not offered. The same goes for an Editor whose plan does not include editing shared projects. See Collaboration.