Prevent errors when installing vim plugins with ansible

This commit is contained in:
Fernando Schauenburg 2020-03-05 08:09:03 +00:00
parent bf313d7bcf
commit ab107815a0

View file

@ -132,14 +132,17 @@ let $MYVIMRC="$XDG_CONFIG_HOME/vim/vimrc"
" This has to be here (as opposed to right after the Plug call) because the " This has to be here (as opposed to right after the Plug call) because the
" function airline#section#create doesn't exist before plug#end() is " function airline#section#create doesn't exist before plug#end() is
" called. " called. THe exists() call is still needed so no errors are generated on
" the very first time vim is run, as no plugins are installed yet.
if exists("airline#section#create")
if has('multi_byte') && &encoding ==# 'utf-8' if has('multi_byte') && &encoding ==# 'utf-8'
let g:airline_section_z = airline#section#create(['%4l/%L 𝚌%3v']) let g:airline_section_z = airline#section#create(['%4l/%L 𝚌%3v'])
else " line / total : col else " line / total : col
let g:airline_section_z = airline#section#create(['L%4l/%L c%3v']) let g:airline_section_z = airline#section#create(['L%4l/%L c%3v'])
endif endif
endif
colorscheme solarized silent! colorscheme solarized
filetype plugin indent on filetype plugin indent on
syntax enable syntax enable
" }}} " }}}