Where are ipython key bindings documented?

6

I'm mostly loving ipython, but exasperated by my efforts to find any documentation for keyboard shortcuts. I can arrow/scroll through my command history, I can use ctrl r to search my history, a la bash, but other bash/readline commands alt D to delete a word or ctrl k to delete a line don't work. I've seen plenty of questions that seem to be about keyboard shortcuts and key bindings, but not a lot of answers.

iPython in Terminal.app: multi-line editing

I'd settle for unindent help right now -- ipython does a nice job of indenting for you when you start a loop or function definition, but it seems like I must be missing something everytime I backspace backspace backspace backspace to unindent when I'm done with my loop.

Amanda

Posted 2012-10-26T14:22:31.127

Reputation: 242

Answers

4

iPython is built on GNU Readline - the same basis for command line editing in bash.

Readline's user documentation covers keyboard shortcuts.

Doug Harris

Posted 2012-10-26T14:22:31.127

Reputation: 23 578

3

You don't need to backspace, just push enter again when you want to end your block; the blank line will signal the end of the block and the extra space will be ignored.

In [17]: for i in range(2):
   ....:     for k in range(1):
   ....:         print i,k
   ....:         
   0 0
   1 0

In [18]: 

esmit

Posted 2012-10-26T14:22:31.127

Reputation: 141

Awesome. That's even easier than ctrl-a, ctrl-k – Amanda – 2013-03-08T14:04:18.473