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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add automatic Closebrackets function to Codemirror. #4985

Merged
merged 2 commits into from Feb 25, 2014

Conversation

damianavila
Copy link
Member

This is a trivial change to add automatic close of brackets {, [ and ( to code cells...
This behaviour is extensively spread across multiple IDE and code editors, and I think it worth to make it a default option.
I tested in live and I really like the millisecond I do not spent looking for the closing bracket 馃槈

Thoughts?

@ellisonbg
Copy link
Member

I think a couple of us should play with this to see what we think.

@Carreau
Copy link
Member

Carreau commented Feb 5, 2014

I don't think it should be default. Julia have asymetrical bracket for semi-open interval IIRC. like [0:3) @stevengj ?

@damianavila
Copy link
Member Author

I don't think it should be default. Julia have asymetrical bracket for semi-open interval IIRC. like [0:3) @stevengj ?

I don't know too much about Julia, so this asymmetrical brackets are used very frequently?
Because, if it is not... probably you are saving more time with the automatic closing than without it.
I think it is a matter of balance between how many times use the asymmetric brackets and how many use the symmetric ones...

@jasongrout
Copy link
Member

Shouldn't codemirror defaults be tied to the language? Already, you should have different syntax highlighting for julia vs. python. It seems like in the same manner, you should also be able to have different plugins loaded.

@stevengj
Copy link

stevengj commented Feb 5, 2014

Julia doesn't have asymmetrical brackets. (There was some discussion of this notation, but it was ultimately rejected: JuliaLang/julia#2040)

@Carreau
Copy link
Member

Carreau commented Feb 5, 2014

Ok, then +1 for me.

@ellisonbg ellisonbg added this to the 2.0 milestone Feb 5, 2014
@damianavila
Copy link
Member Author

Comments? How do you feel it? Thanks.

@jdfreder
Copy link
Member

I just pulled this branch and I really like it, great idea to enable this @damianavila - 馃憤 from me too. Will let someone else merge it though.

@davidtrem
Copy link

Please merge ! I just can't live without this feature now :-)

minrk added a commit that referenced this pull request Feb 25, 2014
Enable autoCloseBrackets in CodeMirror by default.
@minrk minrk merged commit 6dfa8a7 into ipython:master Feb 25, 2014
@damianavila damianavila deleted the closebrackets branch February 25, 2014 21:27
@damianavila
Copy link
Member Author

Thanks!

mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
Enable autoCloseBrackets in CodeMirror by default.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants