diff --git a/docs/source/troubleshooting.rst b/docs/source/troubleshooting.rst index 86aeadbc..007d9367 100644 --- a/docs/source/troubleshooting.rst +++ b/docs/source/troubleshooting.rst @@ -227,21 +227,23 @@ If your vimrc has something like .. code-block:: vim - autocmd! BufWritePost vimrc :source ~/.vimrc + autocmd! BufWritePost ~/.vimrc :source ~/.vimrc -to automatically source vimrc after saving it you must then add ``nested`` after -pattern (``vimrc`` in this case): +used to automatically source vimrc after saving it then you must add ``nested`` +after pattern (``vimrc`` in this case): .. code-block:: vim - autocmd! BufWritePost vimrc nested :source ~/.vimrc + autocmd! BufWritePost ~/.vimrc nested :source ~/.vimrc . Alternatively move ``:colorscheme`` command out of the vimrc to the file which -will not be automatically resourced. Observed problem is that when you use -``:colorscheme`` command existing highlighting groups are usually cleared, -including those defined by powerline. To workaround this issue powerline hooks -``Colorscheme`` event, but when you source vimrc with ``BufWritePost`` event, -but without ``nested`` this event is not launched. See also `autocmd-nested +will not be automatically resourced. + +Observed problem is that when you use ``:colorscheme`` command existing +highlighting groups are usually cleared, including those defined by powerline. +To workaround this issue powerline hooks ``Colorscheme`` event, but when you +source vimrc with ``BufWritePost`` (or any other) event, but without ``nested`` +this event is not launched. See also `autocmd-nested `_ Vim documentation.