summaryrefslogtreecommitdiff
path: root/runtime/scripts.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-03-28 21:08:56 +0000
committerBram Moolenaar <Bram@vim.org>2006-03-28 21:08:56 +0000
commitd2cec5b043361ee798a0522244135f4ea87838f6 (patch)
tree3ad43aed8a8c373f85a2a3adf286b045c14f6cfe /runtime/scripts.vim
parent607a95ed81973faab2e1c3d9c91822082694fdc3 (diff)
downloadvim-git-d2cec5b043361ee798a0522244135f4ea87838f6.tar.gz
updated for version 7.0c02v7.0c02
Diffstat (limited to 'runtime/scripts.vim')
-rw-r--r--runtime/scripts.vim7
1 files changed, 5 insertions, 2 deletions
diff --git a/runtime/scripts.vim b/runtime/scripts.vim
index 9388481db..e709d9544 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 25
+" Last change: 2006 Mar 28
" 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
@@ -185,11 +185,14 @@ else
" - "# It was generated by makepatch " in the second line (makepatch diff).
" - "Index: <filename>" in the first line (CVS file)
" - "=== ", line of "=", "---", "+++ " (SVK diff)
+ " - "=== ", "--- ", "+++ " (bzr diff, common case)
+ " - "=== (removed|added|renamed|modified)" (bzr diff, alternative)
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\+\)'
\ || (s:line1 =~ '^--- ' && s:line2 =~ '^+++ ')
\ || (s:line1 =~ '^\* looking for ' && s:line2 =~ '^\* comparing to ')
\ || (s:line1 =~ '^\*\*\* ' && s:line2 =~ '^--- ')
- \ || (s:line1 =~ '^=== ' && s:line2 =~ '^=\{66\}' && s:line3 =~ '^--- ' && s:line4 =~ '^+++')
+ \ || (s:line1 =~ '^=== ' && ((s:line2 =~ '^=\{66\}' && s:line3 =~ '^--- ' && s:line4 =~ '^+++') || (s:line2 =~ '^--- ' && s:line3 =~ '^+++ ')))
+ \ || (s:line1 =~ '^=== \(removed\|added\|renamed\|modified\)')
set ft=diff
" PostScript Files (must have %!PS as the first line, like a2ps output)