Auto-indent hook for Python script.

Namespace: Sgry.Azuki
Assembly: Azuki (in Azuki.dll) Version: 1.7.13.40248

Syntax

C#
public static readonly AutoIndentHook PythonHook
Visual Basic
Public Shared ReadOnly PythonHook As AutoIndentHook

Field Value

Type: AutoIndentHook

Remarks

This hook delegate provides a special indentation logic for Python programming language.

  • Pressing Enter key increases indentation level if the line was terminated with a colon ( : ).
  • When the caret is in a middle of a paired parentheses, additional spaces will be inserted so that the caret's column position will be the same as the previous opening parenthesis. For example, if there is a code like next:
     Copy imageCopy
    fruits = ('apple', 'orange')
    and pressing Enter when the caret is at one character ahead of a comma will result:
     Copy imageCopy
    fruits = ('apple',
              'orange')

Note that the characters to be used to create indentation will be chosen according to the value of UsesTabForIndent property.

See Also