Skip to main content

DBML editor

The DBML editor is powered by Monaco Editor, which is the fully featured code editor from Visual Studio Code.

Keyboard shortcuts​

  • Focus on a diagram element: Ctrl/Command + F12 or Ctrl/Command + Click
  • Show/hide editor: Ctrl/Command + \
  • Toggle line comment: Ctrl/Command + /
  • Toggle block comment: Shift + Alt/Option + A
  • Open Command Palette: F1
  • Other shortcuts: Press F1 to find the shortcut in the Command Palette

Folding​

You can hide extraneous information and focus on the vital part by folding some lines of code. Below is an example of a folded region:

Folding

By default, folding regions are automatically created based on the indentation in the code. You can manually define a custom folding region depends on your needs by using the syntax:

// #region
...
// #endregion

Example:

  • Line 1 to 14 (unfolded):

Unfolded

  • Line 1 to 14 (folded):

Folded