frank
Goto Top

Install Powerline for Fedora

article-picture
Powerline is a very practical optical extension for vim and the Linux shell (bash, zsh, tmux, IPython, Awesome and Qtile). You can find an overview of all features here.

Installation SHELL

Under Fedora (tested under version 23) you install Powerline for the shell with the following commands:
sudo dnf install powerline

After that the following commands have to be added to the ~/.bashrc file (alternatively to the global file /etc/bashrc if it should apply to all users):
if [ -f `which powerline-daemon` ]; then
  powerline-daemon -q
  POWERLINE_BASH_CONTINUATION=1
  POWERLINE_BASH_SELECT=1
  . /usr/share/powerline/bash/powerline.sh
fi

Now restart the terminal once and Powerline should be active.

c88966dad0b1d09fb9b572bdb4abf7a1

Installation VIM

To enable the status line also in the vim editor (dnf install vim) install the vim plugin with the following commands:

For Fedora 22:
sudo dnf install vim-plugin-powerline

For Fedora 23:
sudo dnf install vim-powerline

Now add the following commands to the end of the ~/.vimrc file (alternatively in the global file /etc/vimrc if you want it to apply to all users):
python from powerline.vim import setup as powerline_setup
python powerline_setup()
python del powerline_setup
set laststatus=2
set t_Co=256

After that you can see the new status line in the vim editor

8dfd8cd6e667a0687d251a253a2ff7b5

Configuration

If you are used to typing "vi" instead of "vim" you can of course add an alias vi='vim' in ~/.bashrc.

Further settings can be found in the detailed documentation of Powerline. If the configuration file ~/.config/powerline/ is changed, the powerline daemon must be restarted with:
powerline-daemon --replace

Have fun with Powerline under Fedora face-smile

Greeting
Frank

Content-Key: 769434671

Url: https://administrator.de/contentid/769434671

Printed on: April 19, 2024 at 00:04 o'clock