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

add ctrl-alt-[ shortcut for indentAuto #963

Merged
merged 1 commit into from
Feb 8, 2016

Conversation

minrk
Copy link
Member

@minrk minrk commented Jan 15, 2016

aka cmd-opt-[

indentAuto is CodeMirror's best guess for the indentation.

This is the shortcut from TextMate, I didn't look up other editors if there's a better choice.

I also moved the common cell commands to Cell base config.

closes #951

and move common cell commands to Cell base config
"Cmd-Alt-[" : "indentAuto",
"Ctrl-Alt-[" : "indentAuto",
"Cmd-/" : "toggleComment",
"Ctrl-/" : "toggleComment",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was going to suggest adding a block comment shortcut, but I checked CodeMirror.commands, and it's not available 😭

@jdfreder
Copy link
Contributor

👍 to this shortcut

@jdfreder jdfreder added this to the 5.0 milestone Jan 22, 2016
Carreau added a commit that referenced this pull request Feb 8, 2016
add ctrl-alt-[ shortcut for indentAuto
@Carreau Carreau merged commit 7e6b508 into jupyter:master Feb 8, 2016
@elmerehbi
Copy link

Thanks for the shortcut though this is not what I was implying in the other issue. I made a screencast to show this.

@minrk minrk deleted the indentAutoShortcut branch February 17, 2016 15:03
@minrk
Copy link
Member Author

minrk commented Feb 17, 2016

@elmerehbi that looks an awful lot like the feature that this adds:

autoindent

what's different that you are looking for?

@elmerehbi
Copy link

@minrk Exactly what I'm looking for. What is it?

@minrk
Copy link
Member Author

minrk commented Feb 17, 2016

That's the shortcut added by this PR: ctrl-alt-[

@elmerehbi
Copy link

Well I remember trying it but it didn't give the same result (not to this code I grabbed online). i'll give it another try.

@elmerehbi
Copy link

@minrk I have version 4.0.6 from Anaconda. The shortcut is not in the list. How can I get it?

@takluyver
Copy link
Member

The bug was closed because the shortcut was added to the development version. You'll have to wait for a new release (or run from the development version) to see the change.

It's currently targeted for 5.0 because it's a new feature - look at the right hand side of this issue page. But it's probably small enough that we could put it in a 4.x release. @minrk ?

@elmerehbi
Copy link

@takluyver Great. Thanks for the clarification.

@jdfreder
Copy link
Contributor

jdfreder commented Mar 3, 2016

But it's probably small enough that we could put it in a 4.x release. @minrk ?

I think new features can get into minor releases. It's only features that change existing behavior that cannot. The key binding used here wasn't already in use. I guess it's debatable though, because users may have it bound now (although I think user config would overwrite it regardless).

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

Successfully merging this pull request may close these issues.

Is there a "reindent" option?
5 participants