tweekmonster / impsort.vim

Sort and highlight Python imports in Vim
MIT License
37 stars 6 forks source link

More impsort_start_nextline issues #12

Closed DanCardin closed 8 years ago

DanCardin commented 8 years ago

with impsort_start_nextline=1, I get

from asdfasdf import (
    alsdkjflktjmn, asdfasdf, cmn, ksjdlfgsdk, lkjolqierjkl, qwerasdljk,
                qwerqwer
)

def main(): pass

I would expect this

from asdfasdf import (
    alsdkjflktjmn, asdfasdf, cmn, ksjdlfgsdk, lkjolqierjkl, qwerasdljk,
    qwerqwer
)

def main(): pass

e.g. the hanging indent is more than the line before it (this isn't what I expected, but might be something you did on purpose. I wasn't sure), and the extra parenthesis line at the end seems to cause 3 lines after the import instead of 2.

tweekmonster commented 8 years ago

Huh, I didn't see that happen when I tested. I'll check again.

tweekmonster commented 8 years ago

Never mind, I must've been remembering something else. I think I see the problem.

DanCardin commented 8 years ago

It still leaves 3 blank lines after the import instead of the normal 2 (which is the case when it doesnt wrap)

tweekmonster commented 8 years ago

Ah, I wasn't testing with a def/class after the import. I only saw two extra lines. I'll take a look.

DanCardin commented 8 years ago

perfect!