Notebook: Ability to move line up in editor with ctrl+up

Created on 11 Jan 2017  Â·  5Comments  Â·  Source: jupyter/notebook

As someone moving from R to python/Jupyter, I miss the option to move the line (or selected lines) up/down with something like ctrl-up/down (as in Atom Editor) or alt-up/down as in RStudio.
Is there a way to do this in the jupyter notebook?

Question

Most helpful comment

Hi @lincolnfrias! This is possible because the notebook uses CodeMirror and CM supports "swapLineUp" and "swapLineDown" commands as apart of its Sublime Text keymap bindings. The following tutorial will explain how you can edit your custom.js file to enable this: http://blog.rtwilson.com/how-to-get-sublime-text-style-editing-in-the-ipythonjupyter-notebook/

All 5 comments

Hi @lincolnfrias! This is possible because the notebook uses CodeMirror and CM supports "swapLineUp" and "swapLineDown" commands as apart of its Sublime Text keymap bindings. The following tutorial will explain how you can edit your custom.js file to enable this: http://blog.rtwilson.com/how-to-get-sublime-text-style-editing-in-the-ipythonjupyter-notebook/

Ok, thanks for the tips.

On Wed, Jan 25, 2017 at 8:22 PM, Grant Nestor notifications@github.com
wrote:

I'm going to close this as we don't plan on supporting this out-of-the-box
http://blog.rtwilson.com/how-to-get-sublime-text-style-editing-in-the-ipythonjupyter-notebook/
.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jupyter/notebook/issues/2036#issuecomment-275251936,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ALVvN5QGEAICiRyJWH5hnRu73CYrgWSZks5rV8szgaJpZM4LgiqH
.

@lincolnfrias did you discover a way to do this without enabling all of the other Sublime-style keyboard commands? I'd like to be able to pick and choose which ones I enable, and how they're bound to the keyboard, because I routinely also use RStudio and IntelliJ (but not Sublime), and I'd like to get as many things as possible to be in agreement.

Hi @kenahoo, I had the same motivation as yours but I did not find a way to pick and choose.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mmngreco picture mmngreco  Â·  3Comments

ehossain1982 picture ehossain1982  Â·  3Comments

harshinielath picture harshinielath  Â·  3Comments

cancan101 picture cancan101  Â·  3Comments

Foadsf picture Foadsf  Â·  3Comments