Jupyter Notebook Ctrl+Shift+- (splitting cell) does not work
Asked Answered
T

5

10

Ctrl + Shift + - is supposed to split the cell from where the cursor is, but it just zooms out the window.

Tarver answered 26/3, 2018 at 7:8 Comment(0)
A
8

If your keyboard has more than one key corresponding to -, and one zooms out instead of splitting cells, try using the other key.

Amen answered 22/11, 2019 at 18:7 Comment(2)
instead of using the key for subtraction, I used the one for hyphen. Hope this helps!Amen
It helped me :)Overrule
R
5

On Mac it is actually:

control ⌃ + shift ⇧ + -

and it does not zoom out, unless you press instead.

Runagate answered 21/3, 2022 at 19:7 Comment(0)
B
3

On Linux, Ctrl-Shift-Minus zooms out, and takes priority over the jupyter setting.

To change the binding, edit ~/.jupyter/nbconfig/notebook.json and insert the following immediately before the final close curly brace:

  ,
  "keys": {
    "edit": {
      "bind": {
        "Ctrl-\\": "jupyter-notebook:split-cell-at-cursor"
      }
    }
}

This changes it to Ctrl-Backslash.

If you want to change a command mode keybinding, replace "edit" above with "command".

You can find the list of functions to bind to in the sources at: https://github.com/jupyter/notebook/blob/master/notebook/static/notebook/js/keyboardmanager.js

Bounden answered 25/8, 2018 at 18:26 Comment(1)
Thnx! But you cannot, link broken...Ioab
S
0

If the keyboard shortcut "Ctrl+Shift+-" is not working to split the cell in Colab, you can use an alternative shortcut:

Click on the cell that you want to split to select it. From the menu at the top of the screen, click on "Edit". From the "Edit" menu, select "Split cell". Note the keyboard shortcut listed next to "Split cell" in the menu. On Windows and Linux, it should be "Ctrl+Shift+-". On Mac, it might be "Cmd+Shift+-". Alternatively, you can also create a custom keyboard shortcut for splitting the cell. Here's how:

Click on "Tools" in the top menu. Select "Keyboard shortcuts" from the dropdown menu. In the Keyboard Shortcuts dialog, scroll down to "Edit" -> "Split cell". Click on the "+" button to add a new shortcut. In the "Add a Shortcut" dialog, press the desired key combination for the shortcut (e.g. "Ctrl+Alt+-"). Click on "OK" to save the new shortcut. After creating the custom shortcut, you can use it to split the cell instead of the default shortcut.

Sigridsigsmond answered 5/3, 2023 at 4:50 Comment(0)
O
0

The new keyboard shortcut that I checked at the setting --> keyboard preferences is:

ctrl+M -

split at cursor

Overstrain answered 28/6, 2024 at 4:43 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.