Skip to content

External editor

Press Ctrl+g in notebook mode to open the selected cell in your editor. jOtter steps aside, your editor takes over the terminal, and when you save and quit, the new text replaces the cell’s source.

The editor is $VISUAL, then $EDITOR, then vi:

Terminal window
EDITOR=hx jotter notebook.ipynb
VISUAL='emacs -nw -Q' jotter notebook.ipynb

The value is a shell command, as with git: arguments, quoting, ~ and $HOME all work, and the cell’s temporary file is appended as the last argument.

The cell is written to a temporary file whose extension matches the cell’s language (.py, .jl, .md, …), so your editor’s syntax highlighting, language server and formatter all apply.

  • If the editor exits with an error (in vim: :cq), the cell is left unchanged.
  • The edit can be undone with u like any other cell change.

For modal editing without leaving jOtter, see the embedded Neovim backend.