tweekmonster / impsort.vim

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

Keep django with 3rd party imports #23

Closed brycefisher closed 4 years ago

brycefisher commented 7 years ago

Before:

from time import sleep

import requests
from django.conf import settings

from myproject.task_queue import celery_app

After:

from time import sleep

import requests

from django.conf import settings

from myproject.task_queue import celery_app

I'd like to keep the django.conf and requests lines in the same group. After a quick scan of the help text, I can't see how to control which group an import line belongs to.

tweekmonster commented 4 years ago

That is intentional since the import statement types are different. Seems you think it looks weird because the imports are sparse. I added an option so you can make the import types dense:

let g:impsort_separate_import_types = 0