aboutsummaryrefslogtreecommitdiff
path: root/vim/plugin
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-07-13 11:00:58 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-07-13 11:00:58 +1200
commit054f1b81d469dc8d153f03b04c2eee0bfc980414 (patch)
treea4b4f6296fd9a53948dbafee688e0c7866bea55c /vim/plugin
parentRemove visual mode space/backspace remap (diff)
downloaddotfiles-054f1b81d469dc8d153f03b04c2eee0bfc980414.tar.gz
dotfiles-054f1b81d469dc8d153f03b04c2eee0bfc980414.zip
Rename and refine reload_vimrc_filetype.vim
Diffstat (limited to 'vim/plugin')
-rw-r--r--vim/plugin/reload_vimrc_filetype.vim (renamed from vim/plugin/reload.vim)15
1 files changed, 5 insertions, 10 deletions
diff --git a/vim/plugin/reload.vim b/vim/plugin/reload_vimrc_filetype.vim
index d1493ad1..d4f853b8 100644
--- a/vim/plugin/reload.vim
+++ b/vim/plugin/reload_vimrc_filetype.vim
@@ -14,15 +14,10 @@ if !has('autocmd') || v:version < 700 || v:version == 700 && !has('patch187')
endif
let g:loaded_reload_vimrc_filetype = 1
-function! s:Reload()
- if &filetype !=# ''
- doautocmd filetypedetect BufRead
- endif
- source $MYVIMRC
- echomsg 'Reloaded vimrc: '.$MYVIMRC
-endfunction
-
-augroup reload
+" This SourceCmd intercepts :source for .vimrc
+augroup reload_vimrc_filetype
autocmd SourceCmd $MYVIMRC
- \ call s:Reload()
+ \ source <afile>
+ \|doautocmd filetypedetect BufRead
+ \|echomsg 'Reloaded vimrc: '.expand('<afile>')
augroup END