From 5374a50bbbabe5616b13b08fdf687a965b3c0486 Mon Sep 17 00:00:00 2001 From: PhilG Date: Mon, 18 May 2015 12:48:59 +0200 Subject: [PATCH] Added hint regarding sourcing vimrc via autocmds When sourcing the vimrc via autocmds in a certain way lightline and other statusline plugins break and stop displaying colors properly. This hint shows how to reload it without the "rendering" breaking. --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index d7b8b08..f4e3878 100644 --- a/README.md +++ b/README.md @@ -132,6 +132,19 @@ to your `.vimrc`. If the colors of the statusline do not change from the default colors, move the settings of `g:lightline` before setting the colorscheme. +If you are reloading your `.vimrc` via `autocmd` and get this problem + +![lightline.vim - tutorial](https://raw.githubusercontent.com/wiki/itchyny/lightline.vim/image/tutorial/20.png) + +when saving it you need to add the nested flag to your `autocmd` like so + +```vim +augroup reload_vimrc + autocmd! + autocmd bufwritepost $MYVIMRC nested source $MYVIMRC +augroup END +``` + Colors appear correctly? Now let's see how to change the appearance.