jupyter / notebook

Jupyter Interactive Notebook
https://jupyter-notebook.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
11.8k stars 5.01k forks source link

Keyboard shortcut for multiline cursor #4761

Open detly opened 5 years ago

detly commented 5 years ago

Multiline editing is currently possible by holding Alt and dragging the mouse to create a multiline cursor. I find this slow and imprecise. Could we also please have a keyboard shortcut to do this? For example, Sublime Text 3 uses Shift+Alt+(up or down arrows). I don't know what's possible with a browser based notebook though.

This is mentioned in a comment on issue #2527 but not responded to.

joshuadanpeterson commented 4 years ago

Has any work been done on this?

mertyertugrul commented 4 years ago

Why there is no shortcut for this?

jsr-p commented 4 years ago

bump

vaknin commented 4 years ago

That would be incredibly useful!

kirilzilla commented 4 years ago

https://github.com/jupyter/notebook/issues/2527 its CMD+Click on macOS.

laughingrice commented 4 years ago

2527 its CMD+Click on macOS.

comment was for a keyboard shortcut, not a mouse shortcut

nickmccullum commented 4 years ago

Has there been any progress on this?

aldanor commented 4 years ago

If you need a multiline cursor for 20 lines, clicking to set up precise locations takes longer than not using the multiline cursor at all. Would it be possible to have a keyboard shortcut for it?

rsayn commented 4 years ago

Bumping this, it's a must-have feature in my opinion. Pressing Alt + up/down arrow to multiline edit is something I'm always lacking when writing code in Jupyter notebooks. As a developer I often find myself using Google Colab for smaller tasks just because of their awesome code editor and auto-completion. I feel that the two features that vanilla notebooks are missing right now are developer-level key bindings like the one proposed here, and an IntelliSense-like autocompletion similar to the ones in VS Code and Colab.

tartakovsky commented 3 years ago

I'll join the party. Missing this feature a lot, one of my most-used features in Jetbrains IDEs.

Note: I specifically mean the ability to create several cursors using only keyboard, e.g. CMD+ALT+Up/Down, without using the mouse.

matuusu commented 3 years ago

If you need a multiline cursor for 20 lines, clicking to set up precise locations takes longer than not using the multiline cursor at all. Would it be possible to have a keyboard shortcut for it?

I know this is not a solution to keyboard shortcut request, but meanwhile it is hopefully implemented, you can help yourself by using ctrl+alt and drag click to select multiple lines using mouse

rishavtraining commented 3 years ago

I'm getting a separate cursor for each cell. After execution of one cell the cursor does not move to other and when I click in the next cell the cursor appears in previous and present both cursor . Please help me fixing this.

farhan-naqvi commented 3 years ago

I'm getting a separate cursor for each cell. After execution of one cell the cursor does not move to other and when I click in the next cell the cursor appears in previous and present both cursor . Please help me fixing this.

Even I am getting this error. I am not able to find any solution to it.

rishavtraining commented 3 years ago

Farhan change the default browser of your jupyter notebook and the issue will be gone. Check out YouTube videos to change the browser. Hope this helps

farhan-naqvi commented 3 years ago

Farhan change the default browser of your jupyter notebook and the issue will be gone. Check out YouTube videos to change the browser. Hope this helps

Hey, I restored my factory settings of chrome and it worked. Anyways thanks a lot for your answer.

Zsailer commented 2 years ago

Thanks @detly.

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.

GabeChurch commented 2 years ago

FYI I found a really annoying issue around multiline-select where the only solution seems to be changing "CodeJump" default setting to use "control" instead of "alt". Only once this has been changed does multiline select work (for me). image