History

initial import

phil9 committed 5 years ago

Commit dd360bcNo parent (first commit)1336 files · +557163 −-5Browse files

Showing the changes to lib/vimfiles/syntax/diff.vim (1 of 1336 files). Show all

Unified · Split

lib/vimfiles/syntax/diff.vim+63−0
@@ -0,0 +1,63 @@
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
7if exists("b:current_syntax")
8 finish
9endif
10
11syn match diffOnly "^Only in .*"
12syn match diffIdentical "^Files .* and .* are identical$"
13syn match diffDiffer "^Files .* and .* differ$"
14syn match diffBDiffer "^Binary files .* and .* differ$"
15syn match diffIsA "^File .* is a .* while file .* is a .*"
16syn match diffNoEOL "^No newline at end of file .*"
17syn match diffCommon "^Common subdirectories: .*"
18
19syn match diffRemoved "^-.*"
20syn match diffRemoved "^<.*"
21syn match diffAdded "^+.*"
22syn match diffAdded "^>.*"
23syn match diffChanged "^! .*"
24
25syn match diffSubname " @@..*"ms=s+3 contained
26syn match diffLine "^@.*" contains=diffSubname
27syn match diffLine "^\<\d\+\>.*"
28syn match diffLine "^\*\*\*\*.*"
29
30"Some versions of diff have lines like "#c#" and "#d#" (where # is a number)
31syn match diffLine "^\d\+\(,\d\+\)\=[cda]\d\+\>.*"
32
33syn match diffFile "^diff.*"
34syn match diffFile "^+++ .*"
35syn match diffFile "^Index: .*$"
36syn match diffFile "^==== .*$"
37syn match diffOldFile "^\*\*\* .*"
38syn match diffNewFile "^--- .*"
39
40syn match diffComment "^#.*"
41
42" Define the default highlighting.
43" Only used when an item doesn't have highlighting yet
44hi def link diffOldFile diffFile
45hi def link diffNewFile diffFile
46hi def link diffFile Type
47hi def link diffOnly Constant
48hi def link diffIdentical Constant
49hi def link diffDiffer Constant
50hi def link diffBDiffer Constant
51hi def link diffIsA Constant
52hi def link diffNoEOL Constant
53hi def link diffCommon Constant
54hi def link diffRemoved Special
55hi def link diffChanged PreProc
56hi def link diffAdded Identifier
57hi def link diffLine Statement
58hi def link diffSubname PreProc
59hi def link diffComment Comment
60
61let b:current_syntax = "diff"
62
63" vim: ts=8 sw=2

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t