diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-07-09 02:34:46 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-07-09 02:34:46 +1200 |
commit | ce0673e08850785842b3caddd51382399768e8ed (patch) | |
tree | 98e4ad05c86df3e6f5ce2e32909b810f7c5ae6af /vim | |
parent | Specify which Vim to run in Makefile (diff) | |
download | dotfiles-ce0673e08850785842b3caddd51382399768e8ed.tar.gz dotfiles-ce0673e08850785842b3caddd51382399768e8ed.zip |
Adjust comments in filetype.vim
Diffstat (limited to 'vim')
-rw-r--r-- | vim/filetype.vim | 8 |
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 |