diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-07-05 11:01:30 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-07-05 11:01:59 +1200 |
commit | 2ba8ba9d035f3071ae03b9929d2b6cfde4b0f6db (patch) | |
tree | f2a774238e7fa37bae62e5c9eb37e4a3ee46a49a /vim/autoload | |
parent | Future-proof README.md discussion of Vim plugins (diff) | |
download | dotfiles-2ba8ba9d035f3071ae03b9929d2b6cfde4b0f6db.tar.gz dotfiles-2ba8ba9d035f3071ae03b9929d2b6cfde4b0f6db.zip |
Add shebang_update.vim plugin
This plugin updates the filetype after every insert operation that
changes the first line. No documentation yet.
Diffstat (limited to 'vim/autoload')
-rw-r--r-- | vim/autoload/shebang.vim | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/vim/autoload/shebang.vim b/vim/autoload/shebang.vim new file mode 100644 index 00000000..f39fcf48 --- /dev/null +++ b/vim/autoload/shebang.vim @@ -0,0 +1,7 @@ +" If the first line was changed in the last insert operation, re-run script +" detection +function! shebang#Update() abort + if line("'[") == 1 + runtime scripts.vim + endif +endfunction |