An experimental nbdev extension for VSCode
Note: This extension assumes the workspace's root is the nbdev project's root.
-
Navigate between code in notebooks and python modules with the
F2
key. This will navigate to the right cell in the corresponding notebook or the corresponding line in the python module! Demo -
Autocomplete with hints for important directives. This triggers in notebooks when you type
#|
(needs a space after the|
to trigger the autocomplete). Demo -
Clean notebooks automatically on save. We have a Jupyter hook that didn't work in VSCode, and this fixes that. Demo. You can toggle this on/off in User settings.
Install the extension from the marketplace in your IDE:
You can change the default keyboard shortcut from F2
for this extension (and any other extension) by modifying your keyboard shortcuts as follows:
- Open the command palette:
CMD + Shift + P
- Search for
Keyboard Shortcuts
, selectPreferences: Open Keyboard Shortcuts
- Search for
nbdev
in the list of shortcuts - If you hover over the left-hand side of the table, an edit icon will appear - this will allow you to change the shortcut.