9

So, I installed the Airline plugin which is working quite nicely. But, I'd like it a bit sweeter. So I went to Powerline.

I installed patched fonts from https://github.com/powerline/fonts/tree/master/Hack and modified my .vimrc like so

enter image description here But, as you can see, it doesn't seem to work correctly...

Is it a font issue or is it something else?

StandardEyre
  • 1,118
  • 1
  • 10
  • 22
Axiol
  • 191
  • 1
  • 2
  • I would vote on font/font size issue. From what I see in the README on font homepage, Powerline glyphs are in Regular part of font, but there might be a problem when there are also Bold parts of text (like NORMAL). I would suggest trying some other Powerline fonts, preferably from the official Powerline Github repo. – grodzik Nov 10 '16 at 11:01
  • I can only see one font un the official repo https://github.com/powerline/powerline/tree/develop/font which doesn't change anything once installed – Axiol Nov 10 '16 at 13:35
  • I see a lot more :P https://github.com/powerline/fonts – grodzik Nov 10 '16 at 14:24
  • Indeed, but, that's from where I got the font (Hack) which is not currently working :) – Axiol Nov 10 '16 at 14:40
  • Ah, didn't noticed that, but I used Source Code Pro, Liberation and few other from there and they worked, but didn't noticed that Hack font back then, so still I recommend trying other fonts. I had similar issue at some point - but I struggle to recall what fixed that exactly. – grodzik Nov 10 '16 at 14:44
  • I've had exactly the same issue, but on urxvt terminal. There, the font width gets calculated rather than trusting the font (because, apparently, some fonts aren't accurate about sizing). When anti-aliasing is enabled, it makes some of those characters appear an extra pixel wide, which then breaks the block-art symbols like you see. Fixes for urxvt include turning off antialiasing or using the -letsp option to adjust the calculated width. How to fix your situation will depend on the terminal you use. – John O'M. Nov 10 '16 at 14:51

1 Answers1

6

See this post. Specifically, paste this into your .vimrc.

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