diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-05-26 23:57:42 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-05-26 23:57:42 +1200 |
commit | 1a59433fa33f737264af73a7323ce669fa14a21a (patch) | |
tree | 1a7234a87b724ca35708536e0e3bb25e16252c73 /autoload | |
parent | Merge branch 'release/v0.2.0' (diff) | |
parent | Bump VERSION (diff) | |
download | vim-vimrc-reload-filetype-master.tar.gz vim-vimrc-reload-filetype-master.zip |
* release/v1.0.0:
Remove literal message documentation
Adjust use of $MYVIMRC and expansion
Move code out to autoload
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/vimrc_reload_filetype.vim | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/autoload/vimrc_reload_filetype.vim b/autoload/vimrc_reload_filetype.vim new file mode 100644 index 0000000..cc8df98 --- /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 $MYVIMRC + if exists('#filetypedetect#BufRead') + doautocmd filetypedetect BufRead + endif + redraw + echomsg 'Reloaded vimrc: '.fnamemodify($MYVIMRC, ':p:~') +endfunction |