aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-07-09 02:34:46 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-07-09 02:34:46 +1200
commitce0673e08850785842b3caddd51382399768e8ed (patch)
tree98e4ad05c86df3e6f5ce2e32909b810f7c5ae6af
parentSpecify which Vim to run in Makefile (diff)
downloaddotfiles-ce0673e08850785842b3caddd51382399768e8ed.tar.gz
dotfiles-ce0673e08850785842b3caddd51382399768e8ed.zip
Adjust comments in filetype.vim
-rw-r--r--vim/filetype.vim8
1 files changed, 5 insertions, 3 deletions
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