mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-07-22 21:45:06 +02:00
added font style fix for mac osx
parent
2d93b081d0
commit
8e71e9d76d
172
FAQ.md
172
FAQ.md
@ -1,86 +1,88 @@
|
||||
#### The powerline font symbols are not showing up
|
||||
|
||||
Adding `let g:airline_powerline_fonts = 1` to your vimrc will automatically populate the `g:airline_symbols` dictionary with the proper font glyphs for various symbols.
|
||||
|
||||
Also, the older deprecated [vim-powerline][a] uses different font codes compared to the current [powerline][b], and the switch above will automatically select codes from the new version. If you want to use the old font codes, you can `:h airline` and copy/paste the configuration variables in the customization section.
|
||||
|
||||
If you are using rxvt-unicode, try using an odd font size, 11, 13, 15 etc. in your .Xdefaults
|
||||
|
||||
If you are using vim in the Terminal on OSX, check that the environment variables `LC_ALL` and `LANG` are set to a sensible value (such as en_US.UTF8). If `:echo &encoding` does not show `utf8` there is a very good chance that these settings are not correct.
|
||||
|
||||
If you are using fontconfig, make sure bitmap fonts are not disabled. That rule, if exists, is usually under /etc/fonts/conf.d/70-no-bitmaps.conf for linux users, which might be a symbolic link. If that's the case, remove that link so that bitmap fonts are available system-wide.
|
||||
|
||||
#### The powerline font symbols are partially messed up
|
||||
|
||||
You are likely using the [fontconfig](https://powerline.readthedocs.org/en/latest/installation/linux.html#font-installation) method. If that is the case, you need to override the space character like so:
|
||||
|
||||
if !exists('g:airline_symbols')
|
||||
let g:airline_symbols = {}
|
||||
endif
|
||||
let g:airline_symbols.space = "\ua0"
|
||||
|
||||
#### There is a pause when leaving insert mode
|
||||
|
||||
You need to set `timeoutlen` to a low number; 50 is recommended.
|
||||
|
||||
#### There is a pause when entering insert mode
|
||||
|
||||
You are running an older version of Vim 7.3, try updating to a newer version.
|
||||
|
||||
#### You don't see any colors
|
||||
|
||||
All of the themes use a 256 terminal color palette. It's likely that the value of `t_Co` is misconfigured. please see this [article][n] on how to configure your terminal. Pull requests for 8 and 16 color terminals are welcome.
|
||||
|
||||
If you are using tmux, start it with the -2 option. This lets it know that the terminal supports 256 colors.
|
||||
|
||||
#### The colors look a little off for some themes.
|
||||
|
||||
Certain themes are derived from the active colorscheme by extracting colors from predefined highlight groups. These airline themes will look good for their intended matching colorschemes, but will be hit or miss when loaded with other colorschemes.
|
||||
|
||||
#### You do not see the current Git branch
|
||||
|
||||
You need [fugitive](https://github.com/tpope/vim-fugitive) to see the current git branch. If you have it and still don't see it then you are probably using version 1.2, which is very old. vim-airline relies on a `fugitive#head()` function. Download v2 from the [project page][d].
|
||||
|
||||
#### vim-airline doesn't appear until I create a new split
|
||||
|
||||
Add `set laststatus=2` to your vimrc.
|
||||
|
||||
#### vim-bufferline is printing to the statusline as well as the command bar
|
||||
|
||||
You can disable automatic echoing by adding `let g:bufferline_echo = 0` to your vimrc.
|
||||
|
||||
#### The statusline wraps
|
||||
|
||||
You are probably using iTerm with double-width characters enabled. Either disable this, or `set ambiwidth=double` in your vimrc.
|
||||
|
||||
#### How do i get rid of the default mode indicator?
|
||||
|
||||
Add `set noshowmode` to your vimrc.
|
||||
|
||||
#### The completion popup is broken/blank when preview is enabled with vim-airline
|
||||
|
||||
For more details see this [issue](https://github.com/bling/vim-airline/issues/78). This appears to depend on the version of Vim installed. Upgrade to the newest version available.
|
||||
|
||||
#### You see things like `^^^^^` in the statusline.
|
||||
|
||||
Try adding `set fillchars+=stl:\ ,stlnc:\ ` to your vimrc. Also, make sure you're using a colorscheme that has different `StatusLine` and `StatusLineNC` highlight groups.
|
||||
|
||||
#### Colors go out of sync when I source my `vimrc`
|
||||
|
||||
vim-airline internally uses autocmds to change colors, and the order of autocmds may change from one configuration to the next. Sometimes this means that if you use things like `BufEnter` you may find that the colors go out of sync. vim-airline exposes a command `AirlineRefresh` which you can use to reload all the colors manually.
|
||||
|
||||
#### Where should I store my own custom theme?
|
||||
|
||||
You could simply edit `dark.vim` in place, since this is the default theme.
|
||||
|
||||
But (especially if you are using a bundler to install airline), you may prefer to keep your theme separate:
|
||||
|
||||
1. Copy `dark.vim` into `~/.vim/autoload/airline/themes/your_theme_name.vim`
|
||||
2. Open that file and search-replace: `:%s/#dark#/#your_theme_name#/g`
|
||||
3. (Optionally) test it with: `:AirlineTheme your_theme_name`
|
||||
4. To make it load on startup, add to your `.vimrc`: `:let g:airline_theme='your_theme_name'`
|
||||
|
||||
[a]: https://github.com/Lokaltog/vim-powerline
|
||||
[b]: https://github.com/Lokaltog/powerline
|
||||
[d]: https://github.com/tpope/vim-fugitive
|
||||
#### The powerline font symbols are not showing up
|
||||
|
||||
Adding `let g:airline_powerline_fonts = 1` to your vimrc will automatically populate the `g:airline_symbols` dictionary with the proper font glyphs for various symbols.
|
||||
|
||||
Also, the older deprecated [vim-powerline][a] uses different font codes compared to the current [powerline][b], and the switch above will automatically select codes from the new version. If you want to use the old font codes, you can `:h airline` and copy/paste the configuration variables in the customization section.
|
||||
|
||||
If you are using rxvt-unicode, try using an odd font size, 11, 13, 15 etc. in your .Xdefaults
|
||||
|
||||
If you are using vim in the Terminal on OSX, check that the environment variables `LC_ALL` and `LANG` are set to a sensible value (such as en_US.UTF8). If `:echo &encoding` does not show `utf8` there is a very good chance that these settings are not correct.
|
||||
|
||||
If you are using fontconfig, make sure bitmap fonts are not disabled. That rule, if exists, is usually under /etc/fonts/conf.d/70-no-bitmaps.conf for linux users, which might be a symbolic link. If that's the case, remove that link so that bitmap fonts are available system-wide.
|
||||
|
||||
Also make sure Terminal uses the same font style (e.g. Meslo) as specified in your vimrc.
|
||||
|
||||
#### The powerline font symbols are partially messed up
|
||||
|
||||
You are likely using the [fontconfig](https://powerline.readthedocs.org/en/latest/installation/linux.html#font-installation) method. If that is the case, you need to override the space character like so:
|
||||
|
||||
if !exists('g:airline_symbols')
|
||||
let g:airline_symbols = {}
|
||||
endif
|
||||
let g:airline_symbols.space = "\ua0"
|
||||
|
||||
#### There is a pause when leaving insert mode
|
||||
|
||||
You need to set `timeoutlen` to a low number; 50 is recommended.
|
||||
|
||||
#### There is a pause when entering insert mode
|
||||
|
||||
You are running an older version of Vim 7.3, try updating to a newer version.
|
||||
|
||||
#### You don't see any colors
|
||||
|
||||
All of the themes use a 256 terminal color palette. It's likely that the value of `t_Co` is misconfigured. please see this [article][n] on how to configure your terminal. Pull requests for 8 and 16 color terminals are welcome.
|
||||
|
||||
If you are using tmux, start it with the -2 option. This lets it know that the terminal supports 256 colors.
|
||||
|
||||
#### The colors look a little off for some themes.
|
||||
|
||||
Certain themes are derived from the active colorscheme by extracting colors from predefined highlight groups. These airline themes will look good for their intended matching colorschemes, but will be hit or miss when loaded with other colorschemes.
|
||||
|
||||
#### You do not see the current Git branch
|
||||
|
||||
You need [fugitive](https://github.com/tpope/vim-fugitive) to see the current git branch. If you have it and still don't see it then you are probably using version 1.2, which is very old. vim-airline relies on a `fugitive#head()` function. Download v2 from the [project page][d].
|
||||
|
||||
#### vim-airline doesn't appear until I create a new split
|
||||
|
||||
Add `set laststatus=2` to your vimrc.
|
||||
|
||||
#### vim-bufferline is printing to the statusline as well as the command bar
|
||||
|
||||
You can disable automatic echoing by adding `let g:bufferline_echo = 0` to your vimrc.
|
||||
|
||||
#### The statusline wraps
|
||||
|
||||
You are probably using iTerm with double-width characters enabled. Either disable this, or `set ambiwidth=double` in your vimrc.
|
||||
|
||||
#### How do i get rid of the default mode indicator?
|
||||
|
||||
Add `set noshowmode` to your vimrc.
|
||||
|
||||
#### The completion popup is broken/blank when preview is enabled with vim-airline
|
||||
|
||||
For more details see this [issue](https://github.com/bling/vim-airline/issues/78). This appears to depend on the version of Vim installed. Upgrade to the newest version available.
|
||||
|
||||
#### You see things like `^^^^^` in the statusline.
|
||||
|
||||
Try adding `set fillchars+=stl:\ ,stlnc:\ ` to your vimrc. Also, make sure you're using a colorscheme that has different `StatusLine` and `StatusLineNC` highlight groups.
|
||||
|
||||
#### Colors go out of sync when I source my `vimrc`
|
||||
|
||||
vim-airline internally uses autocmds to change colors, and the order of autocmds may change from one configuration to the next. Sometimes this means that if you use things like `BufEnter` you may find that the colors go out of sync. vim-airline exposes a command `AirlineRefresh` which you can use to reload all the colors manually.
|
||||
|
||||
#### Where should I store my own custom theme?
|
||||
|
||||
You could simply edit `dark.vim` in place, since this is the default theme.
|
||||
|
||||
But (especially if you are using a bundler to install airline), you may prefer to keep your theme separate:
|
||||
|
||||
1. Copy `dark.vim` into `~/.vim/autoload/airline/themes/your_theme_name.vim`
|
||||
2. Open that file and search-replace: `:%s/#dark#/#your_theme_name#/g`
|
||||
3. (Optionally) test it with: `:AirlineTheme your_theme_name`
|
||||
4. To make it load on startup, add to your `.vimrc`: `:let g:airline_theme='your_theme_name'`
|
||||
|
||||
[a]: https://github.com/Lokaltog/vim-powerline
|
||||
[b]: https://github.com/Lokaltog/powerline
|
||||
[d]: https://github.com/tpope/vim-fugitive
|
||||
[n]: http://vim.wikia.com/wiki/256_colors_in_vim
|
Loading…
x
Reference in New Issue
Block a user