If I open a c file and my buffer is using the "c.vim" ftplugin, then open/edit/source my .vimrc, I lose the functionality of the "c.vim" ftplugin.
what would be the best way to automatically reload the ftplugin?
Here is an example:
buffer state for c file before sourcing my .vimrc:
// This line has an existing comment.
// I used 'o' while on the above line to continue that comment.
// Awesome, after pressing return I am still commenting.
buffer state for c file after sourcing my .vimrc:
// This line has an existing comment.
I used 'o' while on the above line to try and continue that comment.
After pressing return it is obvious the ftplugin for this filetype is not active.
This is my .vimrc in case it is somehow causing the issue:
set nocompatible
set backspace=indent,eol,start
filetype plugin indent on
syntax on
set hls
nnoremap <leader>ev :split $MYVIMRC<cr>
nnoremap <leader>sv :source $MYVIMRC<cr>