|
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時候發(fā)現(xiàn),vim-powerline不能正常顯示,沒有箭頭出現(xiàn)
搞了好久,終于解決了,保證以下各項設(shè)置正確: 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 確保終端中的字體和解碼設(shè)置正確: Konsole: Font --> Consolas for Powerline Set Character Encoding -- > Unicode(UTF-8) GNOME Terminal: 我在CentOS 6.3 GNOME Terminal中的字體沒改,是Ubuntu Mono,把Character Encoding設(shè)置成Unicode(UTF-8),vim-powerline顯示也正常 Window7 下 Putty: Window --> Appearance --> Font settings --> Consolas Window --> Translation --> Character set translation --> Remote character set --> utf8 設(shè)置后發(fā)現(xiàn)還是不能正常顯示
還是字體問題,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字體,再使用上面的 方法,發(fā)現(xiàn)vim statusline不能正常顯示,有空再研究。。 |
|
|