X Tutup
Skip to content

Add option g:pymode_indent_hanging_width for different hanging indentation width#1138

Merged
diraol merged 1 commit intopython-mode:developfrom
wookayin:hanging-indent
Aug 13, 2021
Merged

Add option g:pymode_indent_hanging_width for different hanging indentation width#1138
diraol merged 1 commit intopython-mode:developfrom
wookayin:hanging-indent

Conversation

@wookayin
Copy link
Copy Markdown
Contributor

@wookayin wookayin commented Aug 12, 2021

This is an option for hanging indent size after an open parenthesis
in line continuations. It defaults to &shiftwidth but can be assigned
a different value.

For example, hanging indent size can be set to 4 (even if the tabsize
or shiftwidth is not 4) as per Google Python Style Guide (3.4. Indentation).

Example:

if True:
  pass     # 2 spaces are used for indentation

# 4-space hanging indent; nothing on first line
foo = long_function_name(
    var_one, var_two, var_three,
    var_four)

This is an option for hanging indent size after an open parenthesis
in line continuations. It defaults to `&shiftwidth` but can be assigned
a different value.

For example, hanging indent size can be set to 4 (even if the tabsize
or shiftwidth is not 4) as per Google Python Style Guide.
Copy link
Copy Markdown
Contributor

@diraol diraol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@diraol diraol merged commit 4bc4581 into python-mode:develop Aug 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

X Tutup