Skip to content

Commit

Permalink
Added section for file editor configuration
Browse files Browse the repository at this point in the history
The doc shows how to update codemirror options for the notebook cell editor, but not for the whole file editor. I have added lines 51-62 to give that information. The information comes from Stack-Overflow (and has been tested), but it has been frustratingly long to find, so I think it is worth sharing ...
  • Loading branch information
jmandreoli authored Nov 29, 2020
1 parent 02024f0 commit 9e62e2d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/source/frontend_config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,18 @@ to reissue the patch on new notebooks.
<https://codemirror.net/doc/manual.html#option_indentUnit>`_ which are available
for configuration.

You can similarly change the options of the file editor by entering the following
snippet in the browser's Javascript console once (from a file editing page).::

var config = Jupyter.editor.config
var patch = {
Editor: {
codemirror_options: {
indentUnit: 2
}
}
}
config.update(patch)

Example - Restoring the notebook's default indentation
------------------------------------------------------
Expand Down

0 comments on commit 9e62e2d

Please sign in to comment.