2012-12-14 15:23:26 +01:00
|
|
|
Overview
|
|
|
|
========
|
|
|
|
|
|
|
|
Requirements
|
|
|
|
------------
|
|
|
|
|
2012-12-17 15:24:42 +01:00
|
|
|
Powerline requires Python 2.7 to work.
|
|
|
|
|
|
|
|
Vim plugin requirements
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
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``.
|
|
|
|
|
2012-12-21 11:19:53 +01:00
|
|
|
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.
|
|
|
|
|
2012-12-17 15:24:42 +01:00
|
|
|
Vim version 7.3.661 or newer is recommended for performance reasons.
|
|
|
|
|
2012-12-13 22:43:58 +01:00
|
|
|
Installation
|
2012-12-14 15:23:26 +01:00
|
|
|
------------
|
2012-12-13 22:43:58 +01:00
|
|
|
|
2012-12-19 14:46:14 +01:00
|
|
|
Installing with ``pip``
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^
|
2012-12-18 17:18:37 +01:00
|
|
|
|
2012-12-19 14:46:14 +01:00
|
|
|
To install Powerline system-wide, run the following command as root::
|
2012-12-18 17:18:37 +01:00
|
|
|
|
2012-12-19 14:46:14 +01:00
|
|
|
pip install https://github.com/Lokaltog/powerline/tarball/develop
|
2012-12-18 17:18:37 +01:00
|
|
|
|
2012-12-19 14:46:14 +01:00
|
|
|
If you don't have root access or don't want to install Powerline
|
|
|
|
system-wide, install with ``pip install --user`` instead.
|
2012-12-18 17:18:37 +01:00
|
|
|
|
|
|
|
.. note:: Make sure that you install the package for Python 2. For distros
|
|
|
|
like Arch Linux you'll have to run ``pip2`` instead of ``pip``.
|
2012-12-13 22:43:58 +01:00
|
|
|
|
2012-12-19 14:46:14 +01:00
|
|
|
Distribution-specific packages
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
The following distribution-specific packages are officially supported, and
|
|
|
|
they provide an easy way of installing and upgrading Powerline:
|
|
|
|
|
|
|
|
* `Arch Linux (AUR) <https://aur.archlinux.org/packages/powerline-git/>`_
|
2012-12-17 15:24:42 +01:00
|
|
|
|
2012-12-14 15:23:26 +01:00
|
|
|
Usage
|
|
|
|
-----
|
2012-12-17 15:24:42 +01:00
|
|
|
|
|
|
|
Vim usage
|
|
|
|
^^^^^^^^^
|
|
|
|
|
2012-12-19 14:46:14 +01:00
|
|
|
If Powerline is installed as a Python package, you can enable the vim plugin
|
|
|
|
by adding the following line to your ``vimrc``::
|
2012-12-17 15:24:42 +01:00
|
|
|
|
2012-12-17 15:45:21 +01:00
|
|
|
python from powerline.ext.vim import source_plugin; source_plugin()
|
2012-12-17 15:24:42 +01:00
|
|
|
|
2012-12-19 14:46:14 +01:00
|
|
|
If Powerline is installed somewhere other than Python's site-packages
|
|
|
|
directories (e.g. by having the git repo in your dotfiles directory) you'll
|
|
|
|
have to source the vim plugin file with an absolute path to the plugin
|
|
|
|
location.
|
2012-12-17 15:24:42 +01:00
|
|
|
|
|
|
|
Add the following line to your ``vimrc``, where ``{path}`` is the path to
|
2012-12-19 14:46:14 +01:00
|
|
|
the main Powerline project directory::
|
2012-12-17 15:24:42 +01:00
|
|
|
|
2013-01-02 08:38:28 +01:00
|
|
|
source {path}/powerline/ext/vim/source_plugin.vim
|