Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to undo typing (not command output) in iPython shell

Is there a keyboard command for undoing typing in iPython? Note: I am not talking about undoing the result of a command you've executed.

Suppose I copied and pasted a few variable names as arguments into a long function call, and then realized they are the wrong arguments. Can I do an equivalent of ctrl-z or something that undoes the paste operation?

Ctrl-z kills the iPython session, so not recommended.

like image 835
ely Avatar asked Jun 28 '12 13:06

ely


1 Answers

Ctrl-_ (underscore) or Ctrl-x Ctrl-u

If you deleted something with ctrl-w/ctrl-k and so on you can just paste it back with ctrl-y.

See readline(1) for additional hotkeys.

like image 124
Igor Chubin Avatar answered Sep 30 '22 12:09

Igor Chubin