Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multicursor selection in Jupyter without mouse

Well-known way to use multicursor selection in jupyter notebook is to press Alt and then use the mouse. However is there some way to do it without mouse? E.g. like Ctrl+Shift in Visual Studio.

Doing it with mouse is much more slower than it can be done with keyboard.

like image 733
YV17 Avatar asked Jul 30 '17 11:07

YV17


People also ask

How do you run a selection in Jupyter Notebook?

Shift + Enter run the current cell, select below. Ctrl + Enter run selected cells. Alt + Enter run the current cell, insert below. Ctrl + S save and checkpoint.

How do you select specific cells in a Jupyter Notebook?

4 Time-Saving Python Tricks in Jupyter-Notebook There are commonly known keyboard shortcuts such as Ctrl + Shift + - to split the cell, Shift + M to merge multiple cells, and Shift + Down / Up to select the cells below or above the selected one.

How do you indent selected text in a Jupyter Notebook?

Ctrl + ] indent. Ctrl + [ dedent. Ctrl + A select all.

How do you select markdown in Jupyter Notebook?

Markdown cells can be selected in Jupyter Notebook by using the drop-down or also by the keyboard shortcut 'm/M' immediately after inserting a new cell.


1 Answers

On GitHub, I found this. It is not precisely what you asked for, but speeds up my use of Jupyter considerably.

  • Place cursor in the desired spot
  • Hold Ctrl + Alt
  • Hold your left mouse button and drag mouse over the lines where you want a cursor

This places the mouse cursor in the same column of each line. It works particularly well if you need a mouse cursor at the beginning of each line.

like image 74
NerdOnTour Avatar answered Sep 26 '22 09:09

NerdOnTour