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

Menu Option to Disable Auto Close Brackets #2650

Closed
cancan101 opened this issue Jul 13, 2017 · 4 comments
Closed

Menu Option to Disable Auto Close Brackets #2650

cancan101 opened this issue Jul 13, 2017 · 4 comments

Comments

@cancan101
Copy link
Contributor

Reposting comment from: #2040 (comment)
/CC @jdriordan

It would be great to have something along the lines of:

# Run this in Python once, it should take effect permanently
from notebook.services.config import ConfigManager
c = ConfigManager()
c.update('notebook', {"CodeCell": {"cm_config": {"autoCloseBrackets": False}}})

as a menu option to make the feature more accessible and discoverable.

@jdriordan
Copy link

I think this is a great idea. Automatic brackets can be unfamiliar/infuriating to new jupyter users and the current solution of copypasting an SO answer is less than ideal.

@lilydjwg
Copy link

lilydjwg commented Jun 19, 2018

I'm not a new jupyter user but finally I decided to dig into this and found here. Automatic brackets annoys me a lot because:

  • when I want to change something, I get brackets at the wrong place or missing brackets
    • x = [list comprehension], oops, I need a set.
    • x = some(proc(ess(data))), oops, I missed another call on my data.
    • db.execute('xxxx', key). Oops, the second arg should be a one-element tuple, place the cursor and type ( move then ,). Oh, there is a SyntaxError because my last ) is eaten.
  • I have to type them to jump after the closing ones (or move my right hand away to reach to the right arrow key)

@DrNickBailey
Copy link

The above code in the OP doesn't seem to work on AWS SageMaker when using JupiterLab

@tonyfast
Copy link
Collaborator

This is solved in JupyterLab and will be solved in the future Notebook v7 release.

For more information about this new release, checkout the Notebook v7 Enhancement Proposal.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants