I had a hard time figuring the keyboard shortcut.
Is that true that I should press Ctrl-m
together and press the other key such as d
to delete one cell? I tried it but it did not work for me I also tried without -
but it still does not work for me :(
I am using a Mac.
Shortcuts in both modes: Shift + Enter run the current cell, select below. Ctrl + Enter run selected cells. Alt + Enter run the current cell, insert below.
To launch Jupyter Notebook App: Click on spotlight, type terminal to open a terminal window. Enter the startup folder by typing cd /some_folder_name . Type jupyter notebook to launch the Jupyter Notebook App The notebook interface will appear in a new browser window or tab.
Press 'Enter' to change the cell into the edit mode. You can modify the command mode shortcuts by using the help menu. Click on the 'Help' and choose the 'Edit keyboard shortcuts' option. The following interface shows in the Jupyter notebook where you can define new keyboard shortcuts.
You have to first toggle the right cell state.
The newer version of IPython revamped the command structure, so that cells have two states: input mode, when the cell has a green outline, and command mode, when the cell has a grey outline.
When its green you can edit the content and run it. When its grey you can use the delete insert cell or copy commands.
Hitting Enter or Return activates the green state, while using Esc activates the grey state.
For example:
To delete a cell, use Esc to go in command mode, like the grey outlined cell below, and simply press the d key twice.
On my mac, I use fn key, instead of ctrl, to make shortcuts work in iPython notebook (in Safari). For example,
and so on. As already noted above, you must press Esc before applying any of these shortcuts; that is, you first hit Esc to make a cell "grey", then you press fn + x to cut a cell.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With