From 2ba8ba9d035f3071ae03b9929d2b6cfde4b0f6db Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 5 Jul 2018 11:01:30 +1200 Subject: Add shebang_update.vim plugin This plugin updates the filetype after every insert operation that changes the first line. No documentation yet. --- vim/autoload/shebang.vim | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 vim/autoload/shebang.vim (limited to 'vim/autoload') 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 -- cgit v1.2.3