Databricks is moving the editor used in the Databricks notebook to Monaco, the open source component that powers VS Code. This page describes some of the functionality available with the new editor.
To enable the new editor:
Click your username at the top right of the workspace and select User Settings from the drop down.
Click the Notebook Settings tab.
Check the box next to Turn on the new notebook editor.
When the notebook is connected to a cluster, autocomplete suggestions powered by VS Code IntelliSense automatically appear you type in a cell. Use the up and down arrow keys or your mouse to select a suggestion, and press Tab or Enter to insert the selection into the cell.
To display information about a variable defined in a notebook, hover your cursor over the variable name.
Code folding lets you temporarily hide sections of code. This can be helpful when working with long code blocks because it lets you focus on specific sections of code you are working on.
To hide code, place your cursor at the far left of a cell. Downward-pointing arrows appear at logical points where you can hide a section of code. Click the arrow to hide a code section. Click the arrow again (now pointing to the right) to show the code.
For more details, including keyboard shortcuts, see the VS Code documentation.
You can create multiple cursors to make simultaneous edits easier, as shown in the video:
To create multiple cursors in a cell:
On macOS, hold down the
Optionkey and click in each location to add a cursor.
On Windows, hold down the
Altkey and click in each location to add a cursor.
To create multiple cursors that are vertically aligned:
On macOS, use the keyboard shortcut
Command+ up or down arrow key.
On Windows, use the keyboard shortcut
Alt+ up or down arrow key.
To select multiple items in a column, click at the upper left of the area you want to capture. Then:
On macOS, press
Optionand drag to the lower right to capture one or more columns.
On Windows, press
Altand drag to the lower right to capture one or more columns.
When you click near a parenthesis, square bracket, or curly brace, the editor highlights that character and its matching bracket.
When you display previous notebook versions, the editor displays side-by-side diffs with color highlighting.