Powerline

From ArchWiki
Jump to: navigation, search

Powerline is a statusline plugin for Vim, and provides statuslines and prompts for several other applications, including zsh, bash, tmux, IPython, Awesome, i3 and Qtile.

Installation

Powerline can be installed in multiple ways, depending on preference and/or usage intent.

Official repositories

Install powerline from the official repositories

Using python-pip

Using a vim plugin manager

There are many vim plugin managers available which are able to install and update Powerline, assuming you are using a version of vim with Python support or you install python. For example, using vim-plugAUR from the AUR, add the following to your vimrc file:

~/.vimrc
call plug#begin('path/to/vim/plugins/directory')

Plug 'powerline/powerline', { 'rtp': 'powerline/bindings/vim' }

call plug#end()

Substitute path/to/vim/plugins/directory with the actual directory, such as ~/.vim/plugged, and run the vim-plug command :PlugInstall within vim. This will download Powerline from the Powerline GitHub page to the specified plugin directory and add it to vim.

Fonts

Powerline uses special glyphs and symbols that will not appear correctly unless they are added to fontconfig or patched fonts are installed and used. The fontconfig and some patched fonts are available in the powerline-fonts package from the official repositories.

Airline-vim alternative

There is currently one known alternative to Powerline - Vim-airline. It is a part of vim-plugins and can be installed separately as vim-airline. Optionally, install vim-airline-themes.

Special plugins

Depending on where you want to use Powerline, you might need to install additional packages.

Vim
powerline-vim
Tip: By default, the statusline (and therefore Powerline) only appears when there are multiple windows open. To show it all the time, use :set laststatus=2
i3
python-i3-gitAUR

Usage

For detailed usage instructions, such as configuring your system to use Powerline with shell prompts, window manager widgets, etc., please refer to the Usage section of the Powerline documentation.