Skip to content
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

Shift Tab in Editor #7821

Closed
mlucool opened this issue Jan 24, 2020 · 6 comments
Closed

Shift Tab in Editor #7821

mlucool opened this issue Jan 24, 2020 · 6 comments
Labels
bug pkg:fileeditor status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
Milestone

Comments

@mlucool
Copy link
Contributor

mlucool commented Jan 24, 2020

Description

tab works as expected in the text editor, but shift-tab does not.

Reproduce

Open a file like foo.py to use the text editor. Push tab and it will indent. Push shift+tab and it will not dedent.

Expected behavior

This should work identical to notebook cells (i.e. shift+tab should dedent).

Context

  • Operating System and version: Windows
  • Browser and version: Chrome
  • JupyterLab version: 1.2.3
@ian-r-rose
Copy link
Member

This is a bit subtle, but I believe that it currently works as expected. Tab completions can get completions from both the kernel and from the tokens in the text editor. When a python file has a kernel attached to it, it gets both, but when it has no kernel it only gets the latter. I suspect this is what you are seeing with Tab completions.

However, the Shift+Tab tooltips require a kernel connection to work, so they will only show up if there is a kernel attached to the text file. Can you try attaching a console with a live python session to see if you get tooltips?

cf #5049

@vidartf
Copy link
Member

vidartf commented Jan 29, 2020

@ian-r-rose The way I'm reading this issue it is about using (shift) tab for indenting/dedenting, not completions. Is the indentation behavior related to the completion state somehow?

@jasongrout
Copy link
Contributor

For compatibility with the classic notebook, pressing shift-tab in a place where completions are valid is supposed to bring up a more extensive help than just pressing tab. Pressing shift-tab at the start of a line (or perhaps anywhere in the whitespace indent at the start of a line), or pressing shift-tab when text is selected, should dedent, IIRC.

@ian-r-rose
Copy link
Member

@vidartf you are right, my mistake, disregard the above.

@jasongrout
Copy link
Contributor

@vidartf you are right, my mistake, disregard the above.

Oh, right, this is an issue for just the text editor, not the notebook. Yep, disregard my comment as well, which was focused on the notebook.

@vidartf vidartf added bug and removed pkg:completer labels Jan 31, 2020
@vidartf vidartf modified the milestones: Reference, Future Jan 31, 2020
@vidartf
Copy link
Member

vidartf commented Feb 11, 2020

Fixed via #6127.

@vidartf vidartf closed this as completed Feb 11, 2020
@lock lock bot added the status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. label Mar 12, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Mar 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug pkg:fileeditor status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
Projects
None yet
Development

No branches or pull requests

4 participants