2

Ok so I have setup my .vimrc as followed but I'm still experiencing a few problems with it:

let $VIM=/usr/share/vim/vim74
let $VIMRUNTIME=/usr/share/vim/vim74
execute pathogen#infect()

" air-line"
let g:airline_powerline_fonts = 1


if !exists('g:airline_symbols')
  let 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.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.whitespace = 'Ξ'

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

let g:airline_theme='luna'

set nocompatible
set mouse=a

inoremap <Esc>[62~ <C-X><C-E>
inoremap <Esc>[63~ <C-X><C-Y>
nnoremap <Esc>[62~ <C-E>
nnoremap <Esc>[63~ <C-Y>

set tabstop=4
set autoindent
set shiftwidth=4
set shiftround
set showmatch
set ignorecase
set smartcase
set smarttab
set hlsearch
set incsearch
set history=1000
set undolevels=1000
set visualbell
set noerrorbells
set backspace=indent,eol,start
set background=dark

autocmd InsertEnter * set cul
autocmd InsertLeave * set nocul

syntax on
filetype plugin indent on
set number
silent! nmap <C-p> :NERDTreeToggle<CR>
silent! map <F3> :NERDTreeFind<CR>
let g:NERDTreeMapActivateNode="<F3>"
let g:NERDTreeMapPreview="<F4>"
let g:NERDTreeShowHidden=1
autocmd GUIEnter * set vb t_vb=
autocmd VimEnter * set vb t_vb=
set termencoding=utf8
set term=xterm
set t_Co=256
let &t_AB="\e[48;5;%dm"
let &t_AF="\e[38;5;%dm"
colorscheme base16-eighties
highlight Search ctermbg=green ctermfg=0
highlight IncSearch ctermbg=green ctermfg=0
highlight CursorLine ctermbg=8 ctermfg=0
highlight LineNr ctermfg=blue ctermbg=black
highlight CursorLineNr ctermfg=blue ctermbg=black

My first and main problem is that I've changed my codepage with chcp to 65001. This displays very odd characters instead of the powerline font arrows that I need for my airline in vim. Does anyone know what codepage I would have to use to get it to work properly? Or perhaps there is a different problem altogether?

I am using Hack font patched, I've also tried inconsolata patched. The arrows are correctly displayed for my agnoster theme with zsh so I don't know why it's not working with vim :/

My second problem is that I'm missing my cursor in vim with this configuration. I'm using cygwin with conemu to emulate 256 colors in vim and this started to happen right after I tried to configure it for 256 colors.

set termencoding=utf8
set term=xterm
set t_Co=256
let &t_AB="\e[48;5;%dm"
let &t_AF="\e[38;5;%dm"
colorscheme base16-eighties

This part is responsible for removing my cursor in vim, but it's also responsible for showing the correct colors for both my airline and my colorscheme.

I've gotten all this info from the following two pages: https://stackoverflow.com/questions/20034851/vim-encoding-unicode-in-terminal-under-windows/25073399#25073399

How to fix status bar symbols in Airline plugin?

Here is a screenshot of my config in vim. As you can see it displays odd characters instead of the powerline font ones: vim-airline no propper display

EDIT: For my main problem I forgot to set the encoding in my .vimrc using: set encoding=utf-8 fixed the powerline arrows. Now all I'm left with is trying to fix the cursor which I'm clueless about.

  • github.com/powerline/fonts – Maximus Dec 25 '15 at 20:04
  • Thank you very much for that link maximus, I forgot to mention it in my post. I did indeed use the fonts from there. Anyways my problem seems to be fixed, except for the missing cursor. – SimbaClaws Dec 26 '15 at 0:40
  • Is there any chance your cursor background is just set to be the same colour as your background? What does :highlight cursor report – Rich Jan 15 '16 at 11:56
  • No, the cursor wasn't the same color as the background I think I've checked that back then. Currently I solved the issue by compiling vim in cygwin and using cygwin connector made by maximus in order to add 256 color support. My cursor seems to be working now but a different issue appeared and that is that my mouse doesn't work properly. I can't seem to select things, resize windows etc with it. However my scrollwheel does seem to work. in :version it says +mouse so I do have the support from compiling it. Anyways I'll just deal with it. – SimbaClaws Jan 15 '16 at 21:41
  • Are your 'mouse' and 'ttymouse' settings correct? – Rich Jan 18 '16 at 15:06

Your Answer

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

Browse other questions tagged or ask your own question.