A Chrome extension to provide useful code editting features on Databricks.
- Shortcuts
- Code Snippets
- Open a Databricks notebook on the browser
- Make sure the extension logo is enabled (the extension logo is enabled)
- Select a cell and enter the edit mode
- Type
dp
and pressTab
(dp
will be expanded todisplay()
) - Type
df.gb
and pressTab
(gb
will be expanded togroupBy()
) - Press
Ctrl-U
(The current line will be duplicated below)
- Clone this repository
npm install
npm build
- Open
chrome://extensions
on Chrome - Enable
Developer mode
if it's disabled - Click
Load unpacked
- Select
src
in the extension directory
Note that some default shortcuts in Chrome are overridden.
Shortcut | Action |
---|---|
Ctrl-K | Delete the word the cursor is on |
Ctrl-O | Open a blank line below |
Ctrl-Shift-O | Open a blank line above |
Ctrl-L | Delete up to the end of the current line |
Ctrl-H | Delete up to the start of the current line |
Ctrl-U | Duplicate the current line below |
Ctrl-Shift-U | Duplicate the current line above |
You can add your own snippets by inserting a new key/value pair to the variable snippets
in snippets.js
.
const snippets = {
...
// your own snippet
'mf' : 'myFunc(${args})',
}
Each cell on the notebook has an object called CodeMirror
which manages the cell content and state. This extension injects a JS script to override the properties related to key bindings and add new features not provided by default.
Extension Name | Purpose |
---|---|
DBVim | Enable Vim on Databricks |
DBDark | Provide a dark theme on Databricks |
DBToc | Create a table of contents with one click |
DBHide | Hide unnecessary code and cells |
A huge thanks to Databricks for making big data simple.
MIT