Mercurial > vim
comparison runtime/scripts.vim @ 816:4a79d6d376f0 v7.0c02
updated for version 7.0c02
author | vimboss |
---|---|
date | Tue, 28 Mar 2006 21:08:56 +0000 |
parents | 4f1b94b51e99 |
children | b31702c473ae |
comparison
equal
deleted
inserted
replaced
815:c68b7b2b9e07 | 816:4a79d6d376f0 |
---|---|
1 " Vim support file to detect file types in scripts | 1 " Vim support file to detect file types in scripts |
2 " | 2 " |
3 " Maintainer: Bram Moolenaar <Bram@vim.org> | 3 " Maintainer: Bram Moolenaar <Bram@vim.org> |
4 " Last change: 2006 Mar 25 | 4 " Last change: 2006 Mar 28 |
5 | 5 |
6 " This file is called by an autocommand for every file that has just been | 6 " This file is called by an autocommand for every file that has just been |
7 " loaded into a buffer. It checks if the type of file can be recognized by | 7 " loaded into a buffer. It checks if the type of file can be recognized by |
8 " the file contents. The autocommand is in $VIMRUNTIME/filetype.vim. | 8 " the file contents. The autocommand is in $VIMRUNTIME/filetype.vim. |
9 | 9 |
183 " - "--- " in first line and "+++ " in second line (unified diff). | 183 " - "--- " in first line and "+++ " in second line (unified diff). |
184 " - "*** " in first line and "--- " in second line (context diff). | 184 " - "*** " in first line and "--- " in second line (context diff). |
185 " - "# It was generated by makepatch " in the second line (makepatch diff). | 185 " - "# It was generated by makepatch " in the second line (makepatch diff). |
186 " - "Index: <filename>" in the first line (CVS file) | 186 " - "Index: <filename>" in the first line (CVS file) |
187 " - "=== ", line of "=", "---", "+++ " (SVK diff) | 187 " - "=== ", line of "=", "---", "+++ " (SVK diff) |
188 " - "=== ", "--- ", "+++ " (bzr diff, common case) | |
189 " - "=== (removed|added|renamed|modified)" (bzr diff, alternative) | |
188 elseif s:line1 =~ '^\(diff\>\|Only in \|\d\+\(,\d\+\)\=[cda]\d\+\>\|# It was generated by makepatch \|Index:\s\+\f\+\r\=$\|===== \f\+ \d\+\.\d\+ vs edited\|==== //\f\+#\d\+\)' | 190 elseif s:line1 =~ '^\(diff\>\|Only in \|\d\+\(,\d\+\)\=[cda]\d\+\>\|# It was generated by makepatch \|Index:\s\+\f\+\r\=$\|===== \f\+ \d\+\.\d\+ vs edited\|==== //\f\+#\d\+\)' |
189 \ || (s:line1 =~ '^--- ' && s:line2 =~ '^+++ ') | 191 \ || (s:line1 =~ '^--- ' && s:line2 =~ '^+++ ') |
190 \ || (s:line1 =~ '^\* looking for ' && s:line2 =~ '^\* comparing to ') | 192 \ || (s:line1 =~ '^\* looking for ' && s:line2 =~ '^\* comparing to ') |
191 \ || (s:line1 =~ '^\*\*\* ' && s:line2 =~ '^--- ') | 193 \ || (s:line1 =~ '^\*\*\* ' && s:line2 =~ '^--- ') |
192 \ || (s:line1 =~ '^=== ' && s:line2 =~ '^=\{66\}' && s:line3 =~ '^--- ' && s:line4 =~ '^+++') | 194 \ || (s:line1 =~ '^=== ' && ((s:line2 =~ '^=\{66\}' && s:line3 =~ '^--- ' && s:line4 =~ '^+++') || (s:line2 =~ '^--- ' && s:line3 =~ '^+++ '))) |
195 \ || (s:line1 =~ '^=== \(removed\|added\|renamed\|modified\)') | |
193 set ft=diff | 196 set ft=diff |
194 | 197 |
195 " PostScript Files (must have %!PS as the first line, like a2ps output) | 198 " PostScript Files (must have %!PS as the first line, like a2ps output) |
196 elseif s:line1 =~ '^%![ \t]*PS' | 199 elseif s:line1 =~ '^%![ \t]*PS' |
197 set ft=postscr | 200 set ft=postscr |