Add note about automatic vimrc resourcing

Ref #297
Ref #296
Closes #213
This commit is contained in:
ZyX 2014-08-03 03:04:47 +04:00
parent 2e34e1914c
commit 5173246a93
1 changed files with 25 additions and 0 deletions

View File

@ -150,3 +150,28 @@ Prompt is spoiled after completing files in ksh
This is exactly why powerline has official mksh support, but not official ksh This is exactly why powerline has official mksh support, but not official ksh
support. If you know the solution feel free to share it in `powerline bug support. If you know the solution feel free to share it in `powerline bug
tracker`_. tracker`_.
Powerline loses color after editing vimrc
-----------------------------------------
If your vimrc has something like
.. code-block:: vim
autocmd! BufWritePost vimrc :source ~/.vimrc
to automatically source vimrc after saving it you must then add ``nested`` after
pattern (``vimrc`` in this case):
.. code-block:: vim
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
<http://vimpluginloader.sourceforge.net/doc/autocmd.txt.html#autocmd-nested>`_
Vim documentation.