aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-07-14 20:41:33 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-07-14 20:41:33 +1200
commitefadde49f989a169bb34f1f7024ca661b5ae79cd (patch)
tree8be01e7321a780c740c10507f3bcb3420bd8a01c
parentcd5f438f5ecc65f05e92fb4d0d9ed33e3ef243e5 (diff)
downloaddotfiles-efadde49f989a169bb34f1f7024ca661b5ae79cd.tar.gz
dotfiles-efadde49f989a169bb34f1f7024ca661b5ae79cd.zip
Spin off vimrc_reload_filetype.vim
-rw-r--r--.gitmodules3
m---------vim/bundle/vimrc_reload_filetype0
-rw-r--r--vim/plugin/reload_vimrc_filetype.vim23
3 files changed, 3 insertions, 23 deletions
diff --git a/.gitmodules b/.gitmodules
index e52d990e..4565f637 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -71,3 +71,6 @@
[submodule "vim/bundle/digraph_search"]
path = vim/bundle/digraph_search
url = https://sanctum.geek.nz/code/vim-digraph-search.git
+[submodule "vim/bundle/vimrc_reload_filetype"]
+ path = vim/bundle/vimrc_reload_filetype
+ url = https://sanctum.geek.nz/code/vim-vimrc-reload-filetype.git
diff --git a/vim/bundle/vimrc_reload_filetype b/vim/bundle/vimrc_reload_filetype
new file mode 160000
+Subproject 34f746015a76fda53b70dda91f81edf41f75d47
diff --git a/vim/plugin/reload_vimrc_filetype.vim b/vim/plugin/reload_vimrc_filetype.vim
deleted file mode 100644
index d4f853b8..00000000
--- a/vim/plugin/reload_vimrc_filetype.vim
+++ /dev/null
@@ -1,23 +0,0 @@
-"
-" reload_vimrc_filetype.vim: Add hook to reload active buffer's filetype when
-" vimrc reloaded, so that we don't end up indenting four spaces in an open
-" VimL file, etc. Requires Vim 7.1 or 7.0 with patch 187 (SourceCmd event.)
-"
-" Author: Tom Ryder <tom@sanctum.geek.nz>
-" License: Same as Vim itself
-"
-if exists('g:loaded_reload_vimrc_filetype') || &compatible
- finish
-endif
-if !has('autocmd') || v:version < 700 || v:version == 700 && !has('patch187')
- finish
-endif
-let g:loaded_reload_vimrc_filetype = 1
-
-" This SourceCmd intercepts :source for .vimrc
-augroup reload_vimrc_filetype
- autocmd SourceCmd $MYVIMRC
- \ source <afile>
- \|doautocmd filetypedetect BufRead
- \|echomsg 'Reloaded vimrc: '.expand('<afile>')
-augroup END