Delete cell ipython 2.0

PythonKeyboard ShortcutsIpython

Python Problem Overview


There is probably a very easy solution to this but I'm not sure what it is. Delete cell command in IPython 1.2 used to be:

ctrl-m d

according to the help menu in version 2.0 it says,

Shift-d: delete cell(press twice) 

I've tried holding shift then pressing d twice and various combinations with shift and d and nothing seems to work.. Am I just doing this wrong or the command is actually not working? Any help would be appreciated.

Python Solutions


Solution 1 - Python

In the new IPython cells could have two states: when it has a green selection rectangle around it you can edit what's inside; when it has a grey rectangle around it you edit the cell itself (copy/paste/delete). Enter/Return makes it go green, Esc makes it go grey. When it is gray, 'dd' will delete it.

Solution 2 - Python

To delete a cell, just click on the part margin part of the cell, the part that is not code or output ( right below the Ln[7]: in the picture below), and simply press the d key twice. Clicking there selects the entire cell and allows you to use keyboard short cuts like delete and or create a cell above or below.

enter image description here

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionpbreachView Question on Stackoverflow
Solution 1 - PythondmviannaView Answer on Stackoverflow
Solution 2 - PythonagcontiView Answer on Stackoverflow