I change this file, but it seems that I have to restart Vim to make it take effect.
Is there any way to make .vim/after/ftplugin/markdown.vim
take effect immediately?
I already tried :source
and :runtime
, which do not work.
I change this file, but it seems that I have to restart Vim to make it take effect.
Is there any way to make .vim/after/ftplugin/markdown.vim
take effect immediately?
I already tried :source
and :runtime
, which do not work.
Your best option is probably to trigger the autocommands which are triggered when you set the filetype. To do so you can use :h :doautocmd
with the event FileType
:
:doautocmd filetype
For example:
ia
to insert a a
~/.vim/ftplugin/after/markdown.ft
to add inoremap a A
test.md
doautocmd filetype
ia
will insert A
instead of a
Note that you probably want to add you customization to ~/.vim/after/ftplugin
directory, this will allow to run the built-in ftplugins and your own directives instead of overriding the built-in ones (which happens when you use ~/.vim/ftplugin/