mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-07-23 05:55:38 +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
|
#### 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.
|
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.
|
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 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 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.
|
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
|
Also make sure Terminal uses the same font style (e.g. Meslo) as specified in your vimrc.
|
||||||
|
|
||||||
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:
|
#### The powerline font symbols are partially messed up
|
||||||
|
|
||||||
if !exists('g:airline_symbols')
|
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:
|
||||||
let g:airline_symbols = {}
|
|
||||||
endif
|
if !exists('g:airline_symbols')
|
||||||
let g:airline_symbols.space = "\ua0"
|
let g:airline_symbols = {}
|
||||||
|
endif
|
||||||
#### There is a pause when leaving insert mode
|
let g:airline_symbols.space = "\ua0"
|
||||||
|
|
||||||
You need to set `timeoutlen` to a low number; 50 is recommended.
|
#### There is a pause when leaving insert mode
|
||||||
|
|
||||||
#### There is a pause when entering insert mode
|
You need to set `timeoutlen` to a low number; 50 is recommended.
|
||||||
|
|
||||||
You are running an older version of Vim 7.3, try updating to a newer version.
|
#### There is a pause when entering insert mode
|
||||||
|
|
||||||
#### You don't see any colors
|
You are running an older version of Vim 7.3, try updating to a newer version.
|
||||||
|
|
||||||
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.
|
#### You don't see any colors
|
||||||
|
|
||||||
If you are using tmux, start it with the -2 option. This lets it know that the terminal supports 256 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.
|
||||||
|
|
||||||
#### The colors look a little off for some themes.
|
If you are using tmux, start it with the -2 option. This lets it know that the terminal supports 256 colors.
|
||||||
|
|
||||||
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.
|
#### The colors look a little off for some themes.
|
||||||
|
|
||||||
#### You do not see the current Git branch
|
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 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].
|
#### You do not see the current Git branch
|
||||||
|
|
||||||
#### vim-airline doesn't appear until I create a new split
|
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].
|
||||||
|
|
||||||
Add `set laststatus=2` to your vimrc.
|
#### vim-airline doesn't appear until I create a new split
|
||||||
|
|
||||||
#### vim-bufferline is printing to the statusline as well as the command bar
|
Add `set laststatus=2` to your vimrc.
|
||||||
|
|
||||||
You can disable automatic echoing by adding `let g:bufferline_echo = 0` to your vimrc.
|
#### vim-bufferline is printing to the statusline as well as the command bar
|
||||||
|
|
||||||
#### The statusline wraps
|
You can disable automatic echoing by adding `let g:bufferline_echo = 0` to your vimrc.
|
||||||
|
|
||||||
You are probably using iTerm with double-width characters enabled. Either disable this, or `set ambiwidth=double` in your vimrc.
|
#### The statusline wraps
|
||||||
|
|
||||||
#### How do i get rid of the default mode indicator?
|
You are probably using iTerm with double-width characters enabled. Either disable this, or `set ambiwidth=double` in your vimrc.
|
||||||
|
|
||||||
Add `set noshowmode` to your vimrc.
|
#### How do i get rid of the default mode indicator?
|
||||||
|
|
||||||
#### The completion popup is broken/blank when preview is enabled with vim-airline
|
Add `set noshowmode` to your vimrc.
|
||||||
|
|
||||||
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.
|
#### The completion popup is broken/blank when preview is enabled with vim-airline
|
||||||
|
|
||||||
#### You see things like `^^^^^` in the statusline.
|
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.
|
||||||
|
|
||||||
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.
|
#### You see things like `^^^^^` in the statusline.
|
||||||
|
|
||||||
#### Colors go out of sync when I source my `vimrc`
|
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.
|
||||||
|
|
||||||
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.
|
#### Colors go out of sync when I source my `vimrc`
|
||||||
|
|
||||||
#### Where should I store my own custom theme?
|
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.
|
||||||
|
|
||||||
You could simply edit `dark.vim` in place, since this is the default theme.
|
#### Where should I store my own custom theme?
|
||||||
|
|
||||||
But (especially if you are using a bundler to install airline), you may prefer to keep your theme separate:
|
You could simply edit `dark.vim` in place, since this is the default theme.
|
||||||
|
|
||||||
1. Copy `dark.vim` into `~/.vim/autoload/airline/themes/your_theme_name.vim`
|
But (especially if you are using a bundler to install airline), you may prefer to keep your theme separate:
|
||||||
2. Open that file and search-replace: `:%s/#dark#/#your_theme_name#/g`
|
|
||||||
3. (Optionally) test it with: `:AirlineTheme your_theme_name`
|
1. Copy `dark.vim` into `~/.vim/autoload/airline/themes/your_theme_name.vim`
|
||||||
4. To make it load on startup, add to your `.vimrc`: `:let g:airline_theme='your_theme_name'`
|
2. Open that file and search-replace: `:%s/#dark#/#your_theme_name#/g`
|
||||||
|
3. (Optionally) test it with: `:AirlineTheme your_theme_name`
|
||||||
[a]: https://github.com/Lokaltog/vim-powerline
|
4. To make it load on startup, add to your `.vimrc`: `:let g:airline_theme='your_theme_name'`
|
||||||
[b]: https://github.com/Lokaltog/powerline
|
|
||||||
[d]: https://github.com/tpope/vim-fugitive
|
[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
|
[n]: http://vim.wikia.com/wiki/256_colors_in_vim
|
Loading…
x
Reference in New Issue
Block a user