Update Readme.

Include clarifications about installation from @Airwan.

Fixes https://github.com/lifepillar/vim-solarized8/issues/91.
This commit is contained in:
Lifepillar
2021-03-12 21:01:34 +01:00
parent f9a994d4e6
commit 22a83731c6

View File

@@ -18,13 +18,15 @@ Instead, this color scheme works **out of the box everywhere**. For the best
experience, you need:
- Vim ≥7.4.1799, or NeoVim, with `termguicolors` set, **and**
- [a true-color enabled terminal](https://gist.github.com/XVilka/8346728).
- a terminal supporting millions of colors (but see below for workarounds).
Solarized 8 also works in any GUI version of Vim: no configuration is necessary.<sup>*</sup>
Solarized 8 also works in any GUI version of Vim: no configuration is
necessary.<sup>*</sup>
<sup>*</sup> [VimR](https://github.com/qvacua/vimr) users must set
`termguicolors` before loading the color scheme.
## But, my terminal has only 256 colors!
For terminals not supporting true colors, Solarized 8 will fall back to use an
@@ -42,19 +44,28 @@ If you do not like this approximation, to get exact colors with such terminals
you have two possibilities:
1. Modify some of your terminal colors in the range 16255 to match Solarized
palette. For this purpose, you may run `scripts/solarized8.sh`; no setting is
needed in Vim. Note, however, that this is not supported by all terminals
(e.g., in macOS's Terminal.app this approach does not work: the script has no
effect).
palette. For this purpose, you may run (*not* source!)
`scripts/solarized8.sh`; no setting is needed in Vim. For instance, if you
are using Bash, put this in `.bashrc`:
```sh
sh /path/to/scripts/solarized.sh
```
**Note:** this method is supported only by some, but not all, terminals. For
instance, in Apple's Terminal.app, running `solarized.sh` has no effect.
2. Set your terminal's 16 ANSI colors (the colors in the range 015) to the
Solarized palette and `set t_Co=16` in Vim (or `let g:solarized_use16=1`). Be
aware that, if you force the usage of your terminal colors, but your terminal
is not configured with the Solarized palette, your colors will be completely
off.
Solarized palette (how to do that depends on the terminal) *and* `set
t_Co=16` in Vim (or `let g:solarized_use16=1`) to instruct Vim to use your
terminal's colors. Be aware that, if you force the use of your terminal
colors in Vim with any of these settings, but your terminal is not
configured to use the Solarized palette, your colors will be completely off!
**Note:** whatever method you choose, keep in mind that if your terminal does
not support millions of colors, you must *not* set `termguicolors` (i.e., make
sure that `set termguicolors?` outputs `notermguicolors`).
Finally, if your terminal does not support true colors, you must *not* set
`termguicolors`.
## What if I happen to work on vt100 or similar?
@@ -75,9 +86,21 @@ recommend that you use them. Just clone this repo inside `pack/*/opt`, e.g.:
git clone https://github.com/lifepillar/vim-solarized8.git \
~/.vim/pack/themes/opt/solarized8
Otherwise, use your favourite installation method.
Then, to load the color scheme, put a line like the following in your `vimrc`:
There are actually four optimized<sup>*</sup> color schemes:
```vim
colorscheme solarized8
```
If you opt to use some Vim plugin manager instead, a line like the following
should be added to your `vimrc`, rather than the above, for the color scheme to
be loaded correctly:
```vim
autocmd vimenter * ++nested colorscheme solarized8
```
There are actually four optimized<sup>*</sup> color schemes you may load:
- `solarized8_high`: high-contrast variant (screenshow below, first column);
- `solarized8`: the default Solarized theme (screenshot below, second column);