From d8149ebfb5d8b9a63b0ce6aa2a1fc1bcd57e2a55 Mon Sep 17 00:00:00 2001 From: wsdjeg Date: Sun, 1 Jan 2017 23:20:25 +0800 Subject: [PATCH] Fix airline config --- autoload/SpaceVim.vim | 3 +++ config/plugins/vim-airline.vim | 26 +++++++++++--------------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/autoload/SpaceVim.vim b/autoload/SpaceVim.vim index 30405cf6f..70d9a9ad2 100644 --- a/autoload/SpaceVim.vim +++ b/autoload/SpaceVim.vim @@ -55,6 +55,9 @@ function! SpaceVim#init() abort " < " now Space Vim support these groups: let g:spacevim_plugin_groups = [] + "" + " enable/disable SpaceVim with powerline symbols. + let g:spacevim_enable_powerline_fonts = 1 let g:spacevim_smartcloseignorewin = ['__Tagbar__' , 'vimfiler:default'] let g:spacevim_smartcloseignoreft = ['help'] let g:spacevim_altmoveignoreft = ['Tagbar' , 'vimfiler'] diff --git a/config/plugins/vim-airline.vim b/config/plugins/vim-airline.vim index 498afef64..ad3d8bc55 100644 --- a/config/plugins/vim-airline.vim +++ b/config/plugins/vim-airline.vim @@ -1,5 +1,5 @@ scriptencoding utf-8 -let g:airline_powerline_fonts=1 +let g:airline_powerline_fonts = g:spacevim_enable_powerline_fonts let g:airline_skip_empty_sections = 1 let g:airline#extensions#tabline#enabled = 1 let g:airline#extensions#tmuxline#enabled = 1 @@ -27,30 +27,26 @@ if !exists('g:airline_symbols') endif " unicode symbols -let g:airline_left_sep = 'Β»' let g:airline_left_sep = 'β–Ά' -let g:airline_right_sep = 'Β«' let g:airline_right_sep = 'β—€' let g:airline_symbols.crypt = 'πŸ”’' -let g:airline_symbols.linenr = '␊' -let g:airline_symbols.linenr = '␀' let g:airline_symbols.linenr = 'ΒΆ' let g:airline_symbols.branch = 'βŽ‡' -let g:airline_symbols.paste = 'ρ' -let g:airline_symbols.paste = 'Þ' let g:airline_symbols.paste = 'βˆ₯' let g:airline_symbols.notexists = 'βˆ„' let g:airline_symbols.whitespace = 'Ξ' " powerline symbols -let g:airline_left_sep = 'ξ‚°' -let g:airline_left_alt_sep = 'ξ‚±' -let g:airline_right_sep = 'ξ‚²' -let g:airline_right_alt_sep = 'ξ‚³' -let g:airline_symbols.branch = 'ξ‚ ' -let g:airline_symbols.readonly = 'ξ‚’' -let g:airline_symbols.linenr = 'ξ‚‘' -let g:airline_symbols.maxlinenr= '' +if get(g:, 'airline_powerline_fonts', 0) + let g:airline_left_sep = 'ξ‚°' + let g:airline_left_alt_sep = 'ξ‚±' + let g:airline_right_sep = 'ξ‚²' + let g:airline_right_alt_sep = 'ξ‚³' + let g:airline_symbols.branch = 'ξ‚ ' + let g:airline_symbols.readonly = 'ξ‚’' + let g:airline_symbols.linenr = 'ξ‚‘' + let g:airline_symbols.maxlinenr= '' +endif augroup Fix_airline_with_unite