summaryrefslogtreecommitdiffstats
path: root/runtime/colors
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-04-30 15:40:48 +0200
committerBram Moolenaar <Bram@vim.org>2018-04-30 15:40:48 +0200
commit60a68362aa73f4a6cb534688978f9dc2b16e60fe (patch)
tree0778d5cc682a5a11b459d5c95a56d36f00cfbbce /runtime/colors
parent0e9d1ae3216a5940b36bb56d155fb300b2e55b00 (diff)
patch 8.0.1777: cannot cleanup before loading another colorschemev8.0.1777
Problem: Cannot cleanup before loading another colorscheme. Solution: Add the ColorSchemePre autocommand event.
Diffstat (limited to 'runtime/colors')
-rw-r--r--runtime/colors/README.txt11
1 files changed, 10 insertions, 1 deletions
diff --git a/runtime/colors/README.txt b/runtime/colors/README.txt
index a435c2dd19..4511748daf 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: