bundles / IPython latest / IPython / terminal / shortcuts / newline_autoindent
function
IPython.terminal.shortcuts:newline_autoindent
source: /dev/ipython/IPython/terminal/shortcuts/__init__.py:527
Signature
def newline_autoindent(event)Summary
Insert a newline after the cursor indented appropriately.
Extended Summary
Fancier version of former newline_with_copy_margin which should compute the correct indentation of the inserted line. That is to say, indent by 4 extra space after a function definition, class definition, context manager... And dedent by 4 space after pass, return, raise ....
Aliases
IPython.terminal.shortcuts.newline_autoindent