jupyter / notebook

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

Add a keyboard shortcut to duplicate line in distribution #4505

Open homofortis opened 5 years ago

homofortis commented 5 years ago

Please add a keyboard shortcut to duplicate line in Jupyter distribution. I have to work on multiple remote servers running different Jupiter notebooks and it is inconvenient to set custom setting on each one of them (#1816).

DCapella commented 5 years ago

Just curious here, you do not like the 'c' and 'v' for copy and paste?

homofortis commented 5 years ago

@DCapella I would rather prefer a single shortcut for duplicating a line of block of text, plus Cmd-V is bugged for Safari browser and adds an additional blank line with each paste - so even if I want I cannot emulate 'duplicate' in my environment ;)

DCapella commented 5 years ago

@homofortis Oh definitely makes sense. That's good to know about Safari browsers, thanks for your reply!

cocoaaa commented 5 years ago

Please add a keyboard shortcut to duplicate line in Jupyter distribution. I have to work on multiple remote servers running different Jupiter notebooks and it is inconvenient to set custom setting on each one of them (#1816).

@homofortis Could you share how you managed to set the duplicate-line shortcut? Do you know if this's possible in jupyterlab?

Thanks!

colinbowen commented 4 years ago

@cocoaaa Did you find a way to do this in jupyterlab?

koppax commented 4 years ago

Advantages of Duplicate Line over Ctrl-c/v:

IamPhytan commented 4 years ago

To be fair, Jupyter is based on CodeMirror (the legacy Notebook at least, never tried JupyterLab).

Maybe we could instead have predefined custom keymaps (JetBrains, vim, emacs, Eclipse, Sublime, others) and a way to select which we want to use when the server is run for the first time.

BlkPingu commented 3 years ago

Any progress on this? Any way to add this to the keyboard shortcut settings as a quick fix?

IamPhytan commented 3 years ago

Any progress on this? Any way to add this to the keyboard shortcut settings as a quick fix?

Could this help ?

BlkPingu commented 3 years ago

Thanks for trying to help @IamPhytan. Actually not, as I'm using JupyterLab. Or used. I felt forced to switch to VSCode. They have excellent Jupyter Notebook support in an actual desktop application which is completely unique and a no-brainer feature.