Mercurial > hg > RemoteEditor > vim7
comparison runtime/syntax/diff.vim @ 0:76efa0be13f1
Initial revision
author | atsuki |
---|---|
date | Sat, 10 Nov 2007 15:07:22 +0900 |
parents | |
children | c16898406ff2 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:76efa0be13f1 |
---|---|
1 " Vim syntax file | |
2 " Language: Diff (context or unified) | |
3 " Maintainer: Bram Moolenaar <Bram@vim.org> | |
4 " Last Change: 2005 Jun 20 | |
5 | |
6 " Quit when a (custom) syntax file was already loaded | |
7 if exists("b:current_syntax") | |
8 finish | |
9 endif | |
10 | |
11 syn match diffOnly "^Only in .*" | |
12 syn match diffIdentical "^Files .* and .* are identical$" | |
13 syn match diffDiffer "^Files .* and .* differ$" | |
14 syn match diffBDiffer "^Binary files .* and .* differ$" | |
15 syn match diffIsA "^File .* is a .* while file .* is a .*" | |
16 syn match diffNoEOL "^No newline at end of file .*" | |
17 syn match diffCommon "^Common subdirectories: .*" | |
18 | |
19 syn match diffRemoved "^-.*" | |
20 syn match diffRemoved "^<.*" | |
21 syn match diffAdded "^+.*" | |
22 syn match diffAdded "^>.*" | |
23 syn match diffChanged "^! .*" | |
24 | |
25 syn match diffSubname " @@..*"ms=s+3 contained | |
26 syn match diffLine "^@.*" contains=diffSubname | |
27 syn match diffLine "^\<\d\+\>.*" | |
28 syn match diffLine "^\*\*\*\*.*" | |
29 | |
30 "Some versions of diff have lines like "#c#" and "#d#" (where # is a number) | |
31 syn match diffLine "^\d\+\(,\d\+\)\=[cda]\d\+\>.*" | |
32 | |
33 syn match diffFile "^diff.*" | |
34 syn match diffFile "^+++ .*" | |
35 syn match diffFile "^Index: .*$" | |
36 syn match diffFile "^==== .*$" | |
37 syn match diffOldFile "^\*\*\* .*" | |
38 syn match diffNewFile "^--- .*" | |
39 | |
40 syn match diffComment "^#.*" | |
41 | |
42 " Define the default highlighting. | |
43 " Only used when an item doesn't have highlighting yet | |
44 hi def link diffOldFile diffFile | |
45 hi def link diffNewFile diffFile | |
46 hi def link diffFile Type | |
47 hi def link diffOnly Constant | |
48 hi def link diffIdentical Constant | |
49 hi def link diffDiffer Constant | |
50 hi def link diffBDiffer Constant | |
51 hi def link diffIsA Constant | |
52 hi def link diffNoEOL Constant | |
53 hi def link diffCommon Constant | |
54 hi def link diffRemoved Special | |
55 hi def link diffChanged PreProc | |
56 hi def link diffAdded Identifier | |
57 hi def link diffLine Statement | |
58 hi def link diffSubname PreProc | |
59 hi def link diffComment Comment | |
60 | |
61 let b:current_syntax = "diff" | |
62 | |
63 " vim: ts=8 sw=2 |