You are viewing an older version (9.3.0). Go to latest (9.13.0)
{ } Raw JSON

bundles / IPython 9.3.0 / IPython / terminal / shortcuts / newline_autoindent

function

IPython.terminal.shortcuts:newline_autoindent

source: /IPython/terminal/shortcuts/__init__.py :526

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