From: kaiix Date: Fri, 8 May 2020 13:31:37 +0000 (+0800) Subject: Prefer virtualenv packages over global packages (#1383) (#1384) X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/61f04e658bcc4af228f24bd42a716804ccaaae27 Prefer virtualenv packages over global packages (#1383) (#1384) --- diff --git a/plugin/black.vim b/plugin/black.vim index f3e4409..a0de953 100644 --- a/plugin/black.vim +++ b/plugin/black.vim @@ -138,7 +138,7 @@ def _initialize_black_env(upgrade=False): if first_install: print('Pro-tip: to upgrade Black in the future, use the :BlackUpgrade command and restart Vim.\n') if virtualenv_site_packages not in sys.path: - sys.path.append(virtualenv_site_packages) + sys.path.insert(0, virtualenv_site_packages) return True if _initialize_black_env():