From 9e62e2defee5cb7957225b9e49fc284d96911a01 Mon Sep 17 00:00:00 2001 From: jmandreoli Date: Sun, 29 Nov 2020 16:51:28 +0100 Subject: [PATCH] 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 ... --- docs/source/frontend_config.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/source/frontend_config.rst b/docs/source/frontend_config.rst index be3699ffd2..0ce675b6b4 100644 --- a/docs/source/frontend_config.rst +++ b/docs/source/frontend_config.rst @@ -48,6 +48,18 @@ to reissue the patch on new notebooks. `_ 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 ------------------------------------------------------