Vimjas / vim-python-pep8-indent

A nicer Python indentation style for vim.
Creative Commons Zero v1.0 Universal
790 stars 69 forks source link

Comments just after opening brackets are not ignored #32

Closed lesguillemets closed 9 years ago

lesguillemets commented 10 years ago

Like this :

mydict = {
    "this" : "is good"
}

mydict = { # comments
          "this" : "does not seem good"
          }

This is troublesome when one wants to use foldmarker with (e.g.) dictionaries.

Sorry I couldn't come up with any PR.

blueyed commented 9 years ago

Agreed.

The nothing_after_opening_paren would need to be improved to also ignore comments (https://github.com/hynek/vim-python-pep8-indent/blob/25a499c3a6c1c89f96e906a197cdc6939a8e309e/indent/python.vim#L148).

This could be refactored to use the same behaviour as for the "colon check" (improved in https://github.com/hynek/vim-python-pep8-indent/pull/41).

blueyed commented 9 years ago

This should be fixed now.

Thanks for the report!

lesguillemets commented 9 years ago

:+1: Thank you!