-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Block indent always inserts spaces for indentation, even when configured to use tabs. #7027
Comments
Thanks @fake-name for reporting 👍 Would you be able to check if this is an issue in JupyterLab as well? (since Notebook 7 is based on JupyterLab) |
It works well in text editor in JupyterLab. I think the problem here is that this menu should not be shown when Notebook (rather than a Text Editor) is active. The underlying problem is the same as issues:
In this sense it is a bug in Notebook because in JupyterLab there is no such an entry in the view menu when using a notebook. |
Oh, sorry it is there in JupyterLab too. I think that a good solutions would be to add a new "Cell Editor Indentation" which would toggle indentation for all types of cell (this is what @fake-name for now you should be able to adjust the indentation in "Settings Editor", under "CodeMirror" (to adjust them globally) or under "Notebook" to adjust it on per-cell-type basis. |
so, how to change indentation settings in jupyter notebook? I try to change Settings->Text Editr Indentation, but it affects only the editor but not the notebook. This does not depend on whether I open the notebook in a separate browser tab or in Jupiterlab. Where is notebook settings? |
Hey look, it's a year later and I'm still having issues with codemirror and tabs. Rather then fix the menu so that tabs actually work, apparently the solution was to just delete the menu? It really, really, REALLY wants you to use spaces. If you have code with tab indentation, it tries to convert just the bit you're editing to spaces, leading to broken code. |
Description
When in a jupyter notebook, with indentation set to tab, if you select a block of code and hit tab to indent it, it inserts spaces. If you're using python, this is obviously a problem, particularly on python3.
Reproduce
In jupyter notebook (codemirror? Jupyter has too many poorly delineated components):
Expected behavior
If you have the editor set to tab mode (the correct way to indent things), I'd expect the block indentation operation to insert tabs.
Additionally, Notebook 7 seems to no longer have visible tab characters, whereas they are shown in 6 and/or "nbclassic". I'd call that a regression.
Context
I don't think the rest of the template is relevant, since this seems to be a logic error rather then a bug in the sense of the code doing something it's not intended to do.
The text was updated successfully, but these errors were encountered: