Reword the true colors section a bit

This commit is contained in:
Marco Hinz 2016-09-25 15:21:23 +02:00
parent a293f2c389
commit 95b0e4f0a7
No known key found for this signature in database
GPG Key ID: AC9D48E91BCF448C

View File

@ -1008,30 +1008,29 @@ this:
This would paint the background of the editor red. See `:h :highlight` for more This would paint the background of the editor red. See `:h :highlight` for more
information. information.
So, colorschemes are mostly a collection of `:highlight` commands. So, colorschemes are mostly collections of `:highlight` commands.
Actually, most colorschemes are really 2 colorschemes! The example above sets Actually, most colorschemes are really 2 colorschemes! The example above sets
colors via `ctermbg` and `guibg`. The former definition will only be used if Vim colors via `ctermbg` and `guibg`. The former definition (`cterm*`) will only be
was started in a terminal emulator, e.g. xterm. The latter will be used in used if Vim was started in a terminal emulator, e.g. xterm. The latter (`gui*`)
graphical environments like gVim or when you enable true colors (24bits) support will be used in graphical environments like gvim or MacVim.
in terminal Vim by using `set termguicolors`.
If you ever happen to use a certain colorscheme in Vim running in a terminal If you ever happen to use a colorscheme in terminal Vim and the colors don't
emulator and the colors don't look like the colors in the screenshot at all, look like the ones in the screenshot at all, chances are that the colorscheme
chances are that the colorscheme only defined colors for the GUI _in case of only defines colors for the GUI. Conversely, if you use a graphical Vim (e.g.
older Vim versions_ or in can you are running Vim `7.4.1830` or Neovim you gvim or MacVim) and the colors look off, the colorscheme might only define
didn't enable true colors in your `.vimrc` colors for the terminal.
Many people think that running Vim in the terminal won't give you nice color The latter case can be "solved" by enabling true colors in Neovim or Vim
support for themes like normal editors, but this is not the case anymore. 7.4.1830 and newer. This makes terminal Vim use the GUI definitions instead, but
also requires the terminal emulator itself and all software in between (e.g.
For more info on this you can check `:h termguicolors`. tmux) to be capable of handling true colors. ([This
gist](https://gist.github.com/XVilka/8346728) gives a good overview about the
I use [gruvbox](https://github.com/morhetz/gruvbox) for the GUI and topic.)
[janah](https://github.com/mhinz/vim-janah) for the terminal.
Related: Related:
- `:h 'termguicolors'`
- [List of colorschemes](#list-of-colorschemes-1) - [List of colorschemes](#list-of-colorschemes-1)
- [Cosmetic changes to colorschemes](#cosmetic-changes-to-colorschemes) - [Cosmetic changes to colorschemes](#cosmetic-changes-to-colorschemes)