From ce0673e08850785842b3caddd51382399768e8ed Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 9 Jul 2018 02:34:46 +1200 Subject: Adjust comments in filetype.vim --- vim/filetype.vim | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'vim/filetype.vim') diff --git a/vim/filetype.vim b/vim/filetype.vim index 440ee6e1..89ee5b7d 100644 --- a/vim/filetype.vim +++ b/vim/filetype.vim @@ -42,7 +42,8 @@ function! s:StripRepeat() endfunction -" Check if the first line is a shebang +" Check whether the first line was changed and looks like a shebang, and if +" so, re-run filetype detection function! s:CheckShebang() if line('''[') == 1 && stridx(getline(1), '#!') == 0 doautocmd filetypedetect BufRead @@ -517,8 +518,9 @@ augroup filetypedetect \| runtime scripts.vim \|endif - " If supported, on leaving insert mode, check whether the first line was " - " changed and is a shebang format, and if so, re-run filetype detection + " If supported, on leaving insert mode, check whether the first line was + " changed and looks like a shebang format, and if so, re-run filetype + " detection if v:version > 700 autocmd InsertLeave * call s:CheckShebang() endif -- cgit v1.2.3