美文网首页
Powerline – Adds Powerful Status

Powerline – Adds Powerful Status

作者: zg9uagfv | 来源:发表于2016-05-31 11:34 被阅读0次

    原文地址:http://www.tecmint.com/powerline-adds-powerful-statuslines-and-prompts-to-vim-and-bash/

    Step 1: Installing Generic Requirements for Powerline

    # sudo apt-get install python-pip
    

    Step 2: Installing Powerline Tool in Linux

    #sudo apt-get install git
    #sudo pip install git+git://github.com/Lokaltog/powerline
    

    Step 3: Installing Powerline Fonts in Linux

    #sudo wget https://github.com/powerline/powerline/raw/develop/font/PowerlineSymbols.otf
    #sudo wget https://github.com/powerline/powerline/raw/develop/font/10-powerline-symbols.conf
    #sudo mv PowerlineSymbols.otf /usr/share/fonts/
    #sudo fc-cache -vf /usr/share/fonts/
    #sudo mv 10-powerline-symbols.conf /etc/fonts/conf.d
    

    Step 4: Setting Powerline for Bash Shell and Vim Statuslines

    In this section we shall look at configuring Powerline for bash shell and vim editor. First make your terminal to support 256color by adding the following line to ~/.bashrc file as follows.

    export TERM=screen-256color
    

    Enable Powerline on Bash Shell

    To enable Powerline in bash shell by default, you need to add the following snippet to your ~/.bashrc file.
    First get the location of installed powerline using following command.
    #sudo pip show powerline-status

    Once you know the actual location of powerline, make sure to replace the location in the below line as per your system suggested.

    powerline-daemon -q
    POWERLINE_BASH_CONTINUATION=1POWERLINE_BASH_SELECT=1
    . /usr/local/lib/python2.7/dist-packages/powerline/bindings/bash/powerline.sh
    

    Enable Powerline for Vim

    If vim is your favorite editor, luckily there is a powerful plugin for vim, too. To enable this plugin, add these lines to ~/.vimrc file.

    set  rtp+=/usr/local/lib/python2.7/dist-packages/powerline/bindings/vim/
    set laststatus=2
    set t_Co=256

    相关文章

      网友评论

          本文标题:Powerline – Adds Powerful Status

          本文链接:https://www.haomeiwen.com/subject/yuvcdttx.html