Open haruanm opened 5 years ago
I debuged the python_vimisort.vim file, when it tries to import isort on line 37:
from isort import SortImports
I commented this line, now the plugin does not verify if the isort exists, but starts fast.
As soon as Iave some time, I will try to workarround this problem with some more elegant way and do a pull request.
Same here
wrap the import in a load_isort
function and use it in isort
function:
def load_isort():
try:
# Try isort >= 5
from isort import code
from isort.settings import Config
return code, Config, None
except ImportError:
try:
# Try isort < 5
from isort import SortImports
return None, None, SortImports
except ImportError:
return None, None, None
Then
def isort(text_range):
code, Config, SortImports = load_isort()
if code is None and Config is None and SortImports is None:
...
Good idea! I'll implement this (unless you want to send a PR)
same here
What's the status on this?
For some reason vim isort is taking 1.5 sec to start, i'm using Pathogen, some idea about what to check?
This is my vimrc file: