tweekmonster / impsort.vim

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

Disappearing variable line after multiple import lines #19

Closed petobens closed 7 years ago

petobens commented 7 years ago

Hi @tweekmonster. If I run ImpSort on the following code:

import pandas as pd
from foo import (baaaaaaaaaaaaaaaaaarz, baaaaaaaaaaaaaaz,
                 foooooooooooooooooasdasdasdas)
z = 3

I get

import pandas as pd

from foo import (baaaaaaaaaaaaaaaaaarz, baaaaaaaaaaaaaaz,
                 foooooooooooooooooasdasdasdas)

Is this expected? Thanks!

tweekmonster commented 7 years ago

Is this expected?

Well, yes of course! Case closed! 😜

I'll take a look at this in the morning. Does this still happen with a space between the lines?

petobens commented 7 years ago

Yes, it happens with any number of spaces between the multilline import and the variable assignment.

petobens commented 7 years ago

Thank you!