diff options
author | Bram Moolenaar <Bram@vim.org> | 2006-08-08 18:54:11 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2006-08-08 18:54:11 +0000 |
commit | a8c4d5635c318c27f7255499a95601ba6a962cb7 (patch) | |
tree | 16324cc28ad7f8b617fed4274f058514029c15d8 /runtime/scripts.vim | |
parent | c4c25bfd121c98ac2031507d692489226aa12293 (diff) | |
download | vim-git-a8c4d5635c318c27f7255499a95601ba6a962cb7.tar.gz |
updated for version 7.0-049v7.0.049
Diffstat (limited to 'runtime/scripts.vim')
-rw-r--r-- | runtime/scripts.vim | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/runtime/scripts.vim b/runtime/scripts.vim index e709d9544..275b7ebc1 100644 --- a/runtime/scripts.vim +++ b/runtime/scripts.vim @@ -1,7 +1,7 @@ " Vim support file to detect file types in scripts " " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last change: 2006 Mar 28 +" Last change: 2006 Jul 08 " This file is called by an autocommand for every file that has just been " loaded into a buffer. It checks if the type of file can be recognized by @@ -54,6 +54,12 @@ if s:line1 =~ "^#!" let s:name = substitute(s:line1, '^#!\s*\S*[/\\]\(\i\+\).*', '\1', '') endif + " tcl scripts may have #!/bin/sh in the first line and "exec wish" in the + " third line. Suggested by Steven Atkinson. + if getline(3) =~ '^exec wish' + let s:name = 'wish' + endif + " Bourne-like shell scripts: bash bash2 ksh ksh93 sh if s:name =~ '^\(bash\d*\|\|ksh\d*\|sh\)\>' call SetFileTypeSH(s:line1) " defined in filetype.vim |