vim-powerline: https://github.com/Lokaltog/vim-powerline powerline字体: https://github.com/eugeneching/consolas-powerline-vim CentOS 5.4, CentOS 6.3 echo $LANG en_US Windows7 下 Putty: http://www.chiark./~sgtatham/putty/ Konsole/GNOME Terminal/Putty下打开vim时候发现,vim-powerline不能正常显示,没有箭头出现 搞了好久,终于解决了,保证以下各项设置正确: Linux下 cd ~/.fonts 解压consolas-powerline-vim字体到linux账户主目录下~/.fonts里 mkfontscale mkfontdir fc-cache -vf rm ~/.vim/bundle/vim-powerline/*.cache .vimrc: " powerline set encoding=utf-8 setfillchars+=stl:\ ,stlnc:\ .cshrc/.bashrc: setenv LANG en_US.utf8 # tcsh/csh export LANG=en_US.utf8 # bash 确保终端中的字体和解码设置正确: Konsole: Font --> Consolas for Powerline Set Character Encoding -- > Unicode(UTF-8) GNOME Terminal: 我在CentOS 6.3 GNOME Terminal中的字体没改,是Ubuntu Mono,把Character Encoding设置成Unicode(UTF-8),vim-powerline显示也正常 Window7 下 Putty: Window --> Appearance --> Font settings --> Consolas Window --> Translation --> Character set translation --> Remote character set --> utf8 设置后发现还是不能正常显示 还是字体问题,Putty里面的Consolas不能识别Patched的Consolas字体(vim-powerline的问题http:///2013/02/17/how-to-use-vim-powerline-plugin-in-putty-and-windows/), 我把consolas-powerline-vim里面的字体拷贝到C:\Windows\Fonts,然后在Putty里面把字体改成Consolas for Powerline 保存,再开VIM,问题解决了: 注: 我一直想用Lucida Console字体,拷贝C:\Windows\Fonts下的Lucida Console字体到Linux下 用https://github.com/Lokaltog/vim-powerline/tree/develop/fontpatcher制作vim-powerline字体,再使用上面的 方法,发现vim statusline不能正常显示,有空再研究。。 |
|