I wanted to have my vimrc automatically update when I write to a .vim file using this autocmd:
autocmd BufWritePost *.vim,$MYVIMRC source $MYVIMRC
But for some reason when I have this enabled and then do :w in my vimrc, my vimrc is pasted into my current buffer at the cursor position. How can I prevent this, and why does source behave like this?
:source $MYVIMRCmanually, does this happen? If so, its probably a bug in your vimrc – D. Ben Knoble Nov 10 '19 at 14:08