I would like to add a ruler at 80 characters. I know that you can add rulers to CodeMirror, but I don't know if I'm supposed to place the corresponding javascript in a file somewhere, or in JupyterLab's Advanced Settings Editor
> CodeMirror
> User Overides
section, or if I should do something else all together to get it working.
I'm using JupyterLab 0.31.8
To add a horizontal ruler line to the code cell in the notebook, select 'Notebook' from the Advanced Settings Listing pane. That should then become blue text with the blue bar to the left in that pane like you showed in your first image, but for 'Notebook' now.
Jupyter is now a full-fledged IDE It's a good practice to work like that, so we don't pollute the Notebooks with many definitions. But the text editor bundled with JupyterLab is just that: a simple, featureless text editor.
The feature is available in the recently shipped JupyterLab 1.0.
The feature now is implemented in the current JupyterLab 1.0 alpha (see this PR).
Note: in addition to adding
{
"codeCellConfig": {
"rulers": [80]
}
}
to the Notebook
settings as shown above, you can also add
{
"editorConfig": {
"rulers": [80]
}
}
to the Text Editor
settings.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With