mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-07-28 16:34:31 +02:00
Added Windows section
parent
0e18d7555e
commit
83f7f5a83d
@ -1,6 +1,6 @@
|
|||||||
N.B. I've also answered this on [Vi Stack Exchange][15], but I'm posting it here as it took a lot of work.
|
N.B. I've also answered this on [Vi Stack Exchange][15], but I'm posting it here as it took a lot of work.
|
||||||
|
|
||||||
This took hours to figure out, so here's more of a dummies guide for Fedora/Ubuntu. Windows is probably just downloading the patched fonts talked about below, installing them and setting GVim to use them with `guifont` (I've given up with terminal Vim on Windows).
|
This took hours to figure out, so here's more of a dummies guide for Fedora/Ubuntu, with a special section for Windows.
|
||||||
|
|
||||||
The first is figuring out what the hell are those strange but nice angle brackets that appear in the vim-airline status bar. The background is that airline is a pure vim version of powerline (which was python), and powerline uses UTF-8 characters to insert those angle brackets. So vim-airline just uses the same UTF-8 characters.
|
The first is figuring out what the hell are those strange but nice angle brackets that appear in the vim-airline status bar. The background is that airline is a pure vim version of powerline (which was python), and powerline uses UTF-8 characters to insert those angle brackets. So vim-airline just uses the same UTF-8 characters.
|
||||||
|
|
||||||
@ -47,8 +47,6 @@ The final trick was forcing vim-airline to use the fonts it needs. In the [offic
|
|||||||
let g:airline_symbols.maxlinenr = ''
|
let g:airline_symbols.maxlinenr = ''
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Kitchen sinking it on Fedora and Ubuntu
|
## Kitchen sinking it on Fedora and Ubuntu
|
||||||
|
|
||||||
This is probably an overkill solution, but first you need to get it consistently working before you can simplify it.
|
This is probably an overkill solution, but first you need to get it consistently working before you can simplify it.
|
||||||
@ -72,6 +70,24 @@ This is probably an overkill solution, but first you need to get it consistently
|
|||||||
1. The general powerline font is working in which case you can just use the base font e.g. DejaVu Sans Mono
|
1. The general powerline font is working in which case you can just use the base font e.g. DejaVu Sans Mono
|
||||||
2. If you can't get that working the patched font that you downloaded above should be correct e.g. the equivalent for DejaVu is 'DejaVu Sans Mono for Powerline'.
|
2. If you can't get that working the patched font that you downloaded above should be correct e.g. the equivalent for DejaVu is 'DejaVu Sans Mono for Powerline'.
|
||||||
|
|
||||||
|
## Handling the delicate flower of Windows
|
||||||
|
|
||||||
|
The Powerline Fonts doesn't work with Windows so your only choice is to use a patched font. Also bash script to install all the fonts doesn't work. This means that on Windows you manually have to go into each of the fonts directories and download all the fonts yourself and install them by opening each one in turn.
|
||||||
|
|
||||||
|
I downloaded all of the [Source Code Pro patched fonts][3] and installed them. Even though you install them as individual fonts they get added to Windows as a single font 'Source Code Pro for Powerline' with a separate attribute to specify the weight.
|
||||||
|
|
||||||
|
Then add this to your `.vimrc`:
|
||||||
|
|
||||||
|
set guifont=Source\ Code\ Pro\ for\ Powerline:h15:cANSI
|
||||||
|
|
||||||
|
If you want to use the 'Light' font use this.
|
||||||
|
|
||||||
|
set guifont=Source_Code_Pro_Light:h15:cANSI
|
||||||
|
|
||||||
|
It doesn't make much sense as it doesn't need to include the 'for Powerline', but that's how it works (I figured it out by setting the font in GVim and then using `set guifont?` to check what GVim used). Also I spotted that when you use GVim to switch the font, the font rendering isn't very good. I initially discounted the Light font because when I switched using the GVim menu it rendered badly, but if you put the below into your `.vimrc` and restart GVim it should look lovely.
|
||||||
|
|
||||||
|
Also the nice thing is that you can set your DOS/Powershell prompt to the same font.
|
||||||
|
|
||||||
## Tweaking
|
## Tweaking
|
||||||
|
|
||||||
Once I actually got it working for the first time, it was really disappointing as the icons didn't fully match up. But as per the [FAQ][4] we need to do some tweaking. I started of with Inconsolata as this gives me a consistent font across Windows and Linux. You can install the general font easily on Ubuntu with `apt install fonts-inconsolata` This is what I got:
|
Once I actually got it working for the first time, it was really disappointing as the icons didn't fully match up. But as per the [FAQ][4] we need to do some tweaking. I started of with Inconsolata as this gives me a consistent font across Windows and Linux. You can install the general font easily on Ubuntu with `apt install fonts-inconsolata` This is what I got:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user