Skip to content

Commit 9e62e2d

Browse files
authored
Added section for file editor configuration
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 ...
1 parent 02024f0 commit 9e62e2d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

docs/source/frontend_config.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,18 @@ to reissue the patch on new notebooks.
4848
<https://codemirror.net/doc/manual.html#option_indentUnit>`_ which are available
4949
for configuration.
5050

51+
You can similarly change the options of the file editor by entering the following
52+
snippet in the browser's Javascript console once (from a file editing page).::
53+
54+
var config = Jupyter.editor.config
55+
var patch = {
56+
Editor: {
57+
codemirror_options: {
58+
indentUnit: 2
59+
}
60+
}
61+
}
62+
config.update(patch)
5163

5264
Example - Restoring the notebook's default indentation
5365
------------------------------------------------------

0 commit comments

Comments
 (0)