Instead of only sourcing the vim config when vimrc or $MYVIMRC (xdg.vim) is edited, reload always when saving a vim file. This is a test. But I think it makes sense since I never edit a vim file that is not sourced by my config in any way. Thus reloading should be always appropriate.
7 lines
295 B
VimL
7 lines
295 B
VimL
" Source config upon saving vim file.
|
|
" Group to avoid "exponential" reloading. See:
|
|
" https://stackoverflow.com/questions/2400264/is-it-possible-to-apply-vim-configurations-without-restarting
|
|
augroup vimrc_reload
|
|
autocmd! BufWritePost * source $MYVIMRC | echom "Reloaded" | redraw
|
|
augroup END
|