0

I have airline plugin installed with pathogen.

It displays <bf><bf> etc instead of showing normal characters. If I source my _vimrc, airline displays everything normally. I sometimes have to source twice. It used to work with no problems but recently I uninstalled Vim then installed a 64bit version (unofficial) and then uninstalled the latter and reinstalled vim74 32bit version (windows).

Here is my _vimrc:

set nocompatible
set maxcombine=6  
set autochdir
set backspace=2
set encoding=utf-8
set guifont=Hack:h9
set shiftwidth=3
set smartcase
set autoindent
set cindent
set smartindent 
set number numberwidth=4 relativenumber
set noerrorbells
set hlsearch
set hidden
set nobackup
set history=1000
set noswapfile
set guioptions-=T
set guitablabel=%t
set laststatus=2
set tabstop=3
set background=light


hi Search guifg=red guibg=yellow 

execute pathogen#infect()

syntax on
filetype on
filetype plugin on
filetype indent on

colorscheme solarized 

let g:solarized_italic=0
let g:solarized_bold=0
let g:solarized_contrast="normal"

let g:airline_powerline_font=1
if !exists('g:airline_symbols')
    let g:airline_symbols = {}
endif

 "airline 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 = ''


autocmd BufNewFile,BufReadPost *.c,*.cpp,*.h,*.cxx,*.hpp,*.C,*.cc,*.cp,*.H,*.hxx set filetype=cpp nowrap
autocmd BufNewFile,BufReadPost *.java set filetype=java nowrap
autocmd BufNewFile,BufReadPost *.html,*.html,*.htm5,*.html5 set filetype=html nowrap
autocmd BufNewFile,BufReadPost *.mysql,*.sql  set filetype=mysql nowrap

inoremap <c-u> <esc>viwU<esc>i
nnoremap - ddp
nnoremap <leader>ev :edit $MYVIMRC<cr>
nnoremap <leader>sv :source $MYVIMRC<cr>
nnoremap <leader>p "+p
nnoremap <leader>sd :nohl<cr>:nohl<cr>
nnoremap <leader>u kA<cr>
nnoremap <leader>[ <c-w>W
nnoremap <leader>] <c-w>w

I'm using the following plugins with pathogen:

  • autocomplpop
  • nerdtree
  • nerdcommenter
  • vim-airline
  • vim-airline-themes
  • vim-colors-solarized

For better understanding my problem, here are some screenshots:

Before sourcing _vimrc: Before...

After sourcing _vimrc: After...

New stuff: An extremely weird thing:

moving colorscheme solarized below let g: etc makes sourcing _vimrc once enough to display airline correctly. Before that I used to source twice.

  • AAA I need some answers! – user123124891 Jul 5 '16 at 14:30
  • 1
    Hello and welcome to our site. Please note that all users here are volunteers and help you at their own convenience. Please give it some time for our user base to see your question as we are from all different timezones. There is also no guarantee that we will be able to solve your problem. All that being said, as a first step make sure there are no other vimrc files in any of the other possible directories that vim searches. Se :h _vimrc for a comprehensive list. And on that topic vim on Windows will also try to use a .vimrc if a _vimrc cannot be found. – Tumbler41 Jul 5 '16 at 15:55
-1

I fixed the problem.

Add this to your _vimrc

scriptencoding utf-8

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.