怎么安装Powerline并配置Vim、Bash、tmux、IPython、pdb
安装Powerline及其配置Vim、Bash、tmux、IPython、pdb,首先需要安装Powerline,可以使用pip安装:
pip install powerline-status
安装完成后,可以使用Powerline的命令行工具来配置Vim、Bash、tmux、IPython和pdb:
Vim:在~/.vimrc文件中添加以下内容:
set rtp+=/usr/local/lib/python2.7/site-packages/powerline/bindings/vim/
let g:Powerline_symbols = 'fancy'
set laststatus=2
Bash:在~/.bashrc文件中添加以下内容:
if [ -f /usr/local/lib/python2.7/site-packages/powerline/bindings/bash/powerline.sh ]; then source /usr/local/lib/python2.7/site-packages/powerline/bindings/bash/powerline.sh fi
tmux:在~/.tmux.conf文件中添加以下内容:
source /usr/local/lib/python2.7/site-packages/powerline/bindings/tmux/powerline.conf
IPython:在~/.ipython/profile_default/startup文件中添加以下内容:
c.TerminalInteractiveShell.editing_mode = 'vi' c.TerminalInteractiveShell.extra_open_editor_shortcuts = True c.TerminalInteractiveShell.powerline_style = 'fancy' c.TerminalInteractiveShell.powerline_theme = 'default' c.TerminalInteractiveShell.prompt_includes_vi_mode = True c.TerminalInteractiveShell.prompts_class = 'powerline.prompts.ViPrompt'
pdb:在~/.pdbrc文件中添加以下内容:
import powerline.bindings.pdb powerline.bindings.pdb.setup()
最后,重新启动shell,Powerline就安装完成,并且配置Vim、Bash、tmux、IPython和pdb。
相关文章