diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2018-10-11 02:27:37 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2018-10-11 08:27:37 +0200 |
commit | 2bf1aa5628674e4cda60ac9926bde57bc115e7b7 (patch) | |
tree | bf2521d91f0fcdb50a3eb361b0534453fa14fcd9 /runtime | |
parent | e17e21e4cfb4c9c402b26e49f36af6c2ca6239ec (diff) | |
download | rneovim-2bf1aa5628674e4cda60ac9926bde57bc115e7b7.tar.gz rneovim-2bf1aa5628674e4cda60ac9926bde57bc115e7b7.tar.bz2 rneovim-2bf1aa5628674e4cda60ac9926bde57bc115e7b7.zip |
vim-patch:8.0.1777: cannot cleanup before loading another colorscheme (#9104)
Problem: Cannot cleanup before loading another colorscheme.
Solution: Add the ColorSchemePre autocommand event.
https://github.com/vim/vim/commit/60a68362aa73f4a6cb534688978f9dc2b16e60fe
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/colors/README.txt | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/runtime/colors/README.txt b/runtime/colors/README.txt index 7e845680a9..4636979ef1 100644 --- a/runtime/colors/README.txt +++ b/runtime/colors/README.txt @@ -42,7 +42,16 @@ this autocmd might be useful: Replace "blue_sky" with the name of the colorscheme. In case you want to tweak a colorscheme after it was loaded, check out the -ColorScheme autocmd event. +ColorScheme autocommand event. + +To clean up just before loading another colorscheme, use the ColorSchemePre +autocommand event. For example: + let g:term_ansi_colors = ... + augroup MyColorscheme + au! + au ColorSchemePre * unlet g:term_ansi_colors + au ColorSchemePre * au! MyColorscheme + augroup END To customize a colorscheme use another name, e.g. "~/.vim/colors/mine.vim", and use `:runtime` to load the original colorscheme: |