Skip to content

Indentation problem after multiline function header #118

Closed
@joshdcurtis

Description

@joshdcurtis

I have the following code:

veryLongFunctionName(arg1: type,
                     arg2: type,
                     arg3: type) {
  /* ... */
}

But when I try to make a new line in the function body it auto indents to one indent past the arg3's column in the header. For example, since my indentation is set to two spaces, typing osomeCode<ESC> when my cursor is on arg3 results in the following.

veryLongFunctionName(arg1: type,
                     arg2: type,
                     arg3: type) {
                       someCode
  /* ... */
}

Which is clearly not the intended behavior. It should ideally be based off the indentation level of the start of the header.

I would attempt to fix this myself and issue a pull request, but I don't know anything about vimscript.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions