From 572a53b988e37f9a5f74392d95a6e9080349a548 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sun, 26 May 2019 22:36:16 +1200 Subject: Move code out to autoload --- autoload/vimrc_reload_filetype.vim | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 autoload/vimrc_reload_filetype.vim (limited to 'autoload') diff --git a/autoload/vimrc_reload_filetype.vim b/autoload/vimrc_reload_filetype.vim new file mode 100644 index 0000000..6e4d4b8 --- /dev/null +++ b/autoload/vimrc_reload_filetype.vim @@ -0,0 +1,9 @@ +" Wrapper function reloads .vimrc and filetypes +function! vimrc_reload_filetype#Reload() abort + source + if exists('#filetypedetect#BufRead') + doautocmd filetypedetect BufRead + endif + redraw + echomsg 'Reloaded vimrc: '.expand('') +endfunction -- cgit v1.2.3