Make Tab key insert tabs

Is it possible to prevent the [tab] key from doing autocomplete/suggestions in notebook, and instead add a tab, as expected?

I have tried adding "disabled" : true to various entries in the shortcuts.jupyterlab-settings file, but it doesn’t seem to have any effect,

Code completion is not enabled, (default) in the jupyterlab settings window, so I’m not even sure what is firing the dropdown tooltips.

This is not a question of line indentation, which works. I want the ability to tab the = signs on successive lines so that they line up - with tabs, not spaces.

First two lines are tabbed as desired by copy-pasting tab characters, so tabs are possible, but pressing tab on the next line shows this annoying dropdown instead.
image

1 Like

Supporting this will require a change in JupyterLab in indentMoreOrInsertTab function so that it does not short-circiut when completer is enabled (and skipping the default Tab handler from CM6). This should be easy to do. Can you check if there is an issue on Issues · jupyterlab/jupyterlab · GitHub and if not, open one?

I have tried adding "disabled" : true to various entries in the shortcuts.jupyterlab-settings file, but it doesn’t seem to have any effect,

Did you try adding this in JSON Setting Editor instead? In any case, I would suggest testing out JupyterLab 4.2.0 beta which supports disabling default shortcuts from the shortcut editor.

1 Like

Editing the json in the advanced settings editor in the beta seems to have prevented the tooltip showing up - progress, thanks!

Can you hint at whether its simple for me to manually edit indentMoreOrInsertTab (which file?), and where some direction to enable tabs?

1 Like

No, while it would be easy to edit, it would be rather involved to compile; I would instead encourage you to make a pull request, it would be pretty similar to Fix accepting completion with `Enter` by krassowski · Pull Request #16156 · jupyterlab/jupyterlab · GitHub

Or just open an issue and I will take care of it :wink:

1 Like

Ok, thanks, I couldnt see any issues when I looked before posting here, so made a new one:

2 Likes

Has there been any movement on this? Any way I can help?

Did you try Shift + Tab? For a lot of coding text editors that is how you enter an actual tab.