Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set the tab size for a specific kernel in Jupyterlab?

In Jupyterlab, It is possible to change the tab space for each constituent of a Jupyter notebook through Settings -> Advanced Settings Editor -> Notebook option and editing the tabSize attribute. However, this changes the tab size for the notebooks for every kernel.

I would like to have 2 tab spaces for Scala kernel and 4 tab spaces (the default) for the rest. It such a setting possible?

like image 711
Ébe Isaac Avatar asked Apr 05 '18 04:04

Ébe Isaac


People also ask

How do I change the tab size in Jupyter Notebook?

Bug: Tab Size in Jupyter Notebook Does Not Respect SettingsGo to VS Code Settings (File -> Preferences), adjust Editor: Tab Size (editor.

How do I change the kernel in JupyterLab?

To change the kernel version in Jupyter Python Notebooks follow the steps below : Open the Python Notebook and click on " Kernel " from the menu bar located on top of the python notebook. Click on " Change kernel " from the drop down box that appears and chose the version that is required.

How do you indent a block of code in Jupyter Notebook?

Ctrl + ] indent. Ctrl + [ dedent. Ctrl + A select all.

What does Shift tab do in Jupyter Notebook?

And later, you may try these below-mentioned shortcuts for Edit mode in Jupyter Notebook: Shift + Tab: For enabling tooltip feature so that it can provide explanations about the attached active elements.


1 Answers

Short answer

No, but you should file an issue about it on the Jupyterlab github, since the devs are pretty responsive to this kind of thing. For example, I got them to implement a way to turn off the crazy-making autoClosingBrackets behavior in all of the editors just by asking nicely.

Details

The definitions/defaults for all of the notebook settings are currently implemented in this json file in the Jupyterlab source. The relevant tabSize setting can be found inside the codeCellConfig field, the description of which is:

The configuration for all code cells.

and it does indeed apply to all code cells, regardless of kernel/language.

like image 157
tel Avatar answered Nov 08 '22 10:11

tel