Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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

FeatureBehaviour
HighlightingKeywords, names, literals and comments are coloured. Names are coloured by what they are (concept, property…), not only by syntax.
DiagnosticsErrors 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.
CompletionKeywords, 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.
HoverHover 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.
IndentationTwo spaces. Tab indents the selection, Shift+Tab un-indents it.
Comment continuationEnter 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 countA 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.
FoldingClick 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.

ItemShown whenAction
✂ Cut / ⧉ CopyText is selected.Clipboard.
# Copy nameOn a name.Copies the name as written, for example people.Person.
▢ Select wordOn a name.Selects it.
▢ Select blockInside a declaration.Selects the whole declaration (a concept, property, fact…).
🕸 Reveal in graphOn a name.Switches the output panel to Graph, centres the node and highlights it.
🐢 Reveal in turtle exportOn a name, in an ordinary project.Switches to the Turtle tab and highlights the Turtle generated for that declaration. See Reveal.
🐢 Reveal in turtle sourceOn a name, in a project imported from Turtle.Opens the original .ttl at the matching statement. See Reveal.
⎘ PasteAlways.Pastes the clipboard. Your browser may ask for permission first.
⌖ Go to definitionOn a name.Jumps to its declaration, opening the other file if needed. Same as F12.
ℹ Peek infoOn a name.Shows the hover information in a popup where you clicked. Escape closes it.
🔗 Find all referencesOn a name.Lists every place the name is used, declaration included. Click one to go there.
✎ Rename symbolOn 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.