diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-05-26 23:55:25 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-05-26 23:55:25 +1200 |
commit | 890fd7da4a1fae1c0b3d806875c9f50271c47ce8 (patch) | |
tree | 1b5e5a3bd705677037e2f0938bee906da5840f12 | |
parent | Move code out to autoload (diff) | |
download | vim-vimrc-reload-filetype-890fd7da4a1fae1c0b3d806875c9f50271c47ce8.tar.gz vim-vimrc-reload-filetype-890fd7da4a1fae1c0b3d806875c9f50271c47ce8.zip |
Adjust use of $MYVIMRC and expansion
-rw-r--r-- | autoload/vimrc_reload_filetype.vim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/autoload/vimrc_reload_filetype.vim b/autoload/vimrc_reload_filetype.vim index 6e4d4b8..cc8df98 100644 --- a/autoload/vimrc_reload_filetype.vim +++ b/autoload/vimrc_reload_filetype.vim @@ -1,9 +1,9 @@ " Wrapper function reloads .vimrc and filetypes function! vimrc_reload_filetype#Reload() abort - source <afile> + source $MYVIMRC if exists('#filetypedetect#BufRead') doautocmd filetypedetect BufRead endif redraw - echomsg 'Reloaded vimrc: '.expand('<afile>') + echomsg 'Reloaded vimrc: '.fnamemodify($MYVIMRC, ':p:~') endfunction |