IPython newlines with ^V^J
If you're having trouble adding newlines in the middle of a multiline code block in IPython, try using Ctrl-V Ctrl-J to insert a linebreak at the cursor. It will not execute the code block like hitting Enter will.
Also, navigating a multiline code block is faster with Escape-B and Escape-F (skip word backward/forward).
If you haven't tried IPython at all yet, it's a nicer command line interface for Python with better command history and line editing features. Just "pip install ipython".
Written by Kenneth Falck
Related protips
1 Response
How did you find this out? What other secrets are hiding?
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Python
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#