From f423ba11c856f908f0729c7a1ece8841e707a0be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kim=20Silkeb=C3=A6kken?= Date: Fri, 21 Dec 2012 11:19:53 +0100 Subject: [PATCH] Add information about Python support --- docs/source/overview.rst | 6 ++++++ powerline/ext/vim/powerline.vim | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/docs/source/overview.rst b/docs/source/overview.rst index 9acde746..be7f2a30 100644 --- a/docs/source/overview.rst +++ b/docs/source/overview.rst @@ -13,6 +13,12 @@ The vim plugin requires a vim version with Python 2.7 support compiled in. You can check if your vim supports Python 2 by running ``vim --version | grep +python``. +If your vim version doesn't have support for Python 2, you'll have to +compile it with the ``--enable-pythoninterp`` flag (this also requires the +Python headers to be installed on your system). Please consult your +distribution's documentation for details on how to compile and install +packages. + Vim version 7.3.661 or newer is recommended for performance reasons. Installation diff --git a/powerline/ext/vim/powerline.vim b/powerline/ext/vim/powerline.vim index d60ca7e6..875ac243 100644 --- a/powerline/ext/vim/powerline.vim +++ b/powerline/ext/vim/powerline.vim @@ -1,3 +1,8 @@ +if ! has('python') + echoe 'You need vim compiled with Python 2 support for Powerline to work. Please consult the documentation for more details.' + finish +endif + python import sys, vim, os python sys.path.append(vim.eval('expand(":h:h:h:h")')) python import uuid