Jupyter Lab doesn't have shortcut keys to move cells up and down. Also, since the operation with the mouse was complicated, I made my own shortcut key. I will write it down as a memorandum.
Settings-> Advanced Settings Editor
.Keyboard Shortcuts
, enter the following in ʻUser Preferences` on the right and save.UserPreferences
{
"shortcuts": [
{
"command": "notebook:move-cell-up",
"keys": [
"Ctrl Shift K"
],
"selector": ".jp-Notebook:focus"
},
{
"command": "notebook:move-cell-down",
"keys": [
"Ctrl Shift J"
],
"selector": ".jp-Notebook:focus"
},
]
}
You can now use Ctrl Shift K
to move the cell up and Ctrl Shift J
to move the cell down while in cell mode.
Since the shortcut key to select the upper (lower) cell of the selected cell with Ctrl K (Ctrl J)
was assigned, this shortcut was changed to Ctrl Shift K (Ctrl Shift J)
. ..
If you want to create other shortcut keys, you can find out by searching for System Defaults
.
By the way, displaying the line number can be set in the same way.
Enter the following in ʻUser Preferences of
Settings-> Advanced Settings Editor-> Notebook` and save.
UserPreferences
{
"codeCellConfig":{
"lineNumbers": true,
},
}