Search code examples
ipythonprompt-toolkit

Go up one command instead of one line in IPython 5


IPython 5 is a big release. One of its features is real multi-line editing with prompt_toolkit. The up arrow key now moves to the previous input line instead of the previous input command (block of lines).

This is awesome, but when my previous command spans many lines, and I need to reach the command before that, I find myself wishing I could go up one command at a time. Is there a way to do that? The shortcut ctrlp has the exact same behaviour as the up arrow key, so it does not provide a solution.


Solution

  • On my own Belgian Mac keyboard, fnshift does the job. But I cannot tell whether this also works for other locales.