PyCharm 4.5.3 Help

Completing Statements

The Smart Enter completion enables you to create syntactically correct code constructs.

In this section:

Completing statements

To automatically complete a statement, follow these steps:

  • Start typing a statement, and press Ctrl+Shift+Enter.

    The punctuation required in the current context is added and the caret moves to the next editing position.

Examples

Completing a method declaration

Start typing a method declaration, and press Ctrl+Shift+Enter after the opening parenthesis:

py_completing_code_construct_1

This will create the entire construct of a method, the caret resting inside the method body:

py_completing_code_construct_2

Completing code constructs

Start typing a code construct:

py_completing_code_construct_3

After pressing Ctrl+Shift+Enter, the construct is completed, and the caret is placed at the next editing position:

py_completing_code_construct_4

See Also

Reference:

Web Resources:

Last modified: 18 July 2015