File: diff.jsf.in

package info (click to toggle)
joe 3.5-1.1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 3,088 kB
  • ctags: 2,405
  • sloc: ansic: 33,186; sh: 3,413; makefile: 130
file content (91 lines) | stat: -rw-r--r-- 1,411 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# JOE syntax highlight file for diff/patch files
# 2004-05-11 Tom Marshall <tommy@home.tig-grr.com>

# Start from beginning of file when sync is lost
-

# Color definitions
=Idle
=Options	blue
=FileNew	bold green
=FileOld	bold red
=DiffStuff	magenta
=DelLine	red
=AddLine	green
=Unchanged

:reset Idle
	*		goo
	"\n"		reset
	"d"		goo		buffer
	"-"		preudiff	buffer
	"*"		precdiff	buffer
	"0-9"		ndiff		recolor=-1

# Unified diff?
:preudiff Idle
	*		goo		strings
	"---"		udiffold	recolor=-3
done
	"-"		preudiff

# Context diff?
:precdiff Idle
	*		goo		strings
	"***"		cdiffbegin	recolor=-3
done
	"*"		precdiff

:options Options
	*		options
	"\n"		reset

:goo Idle
	*		goo		strings
	"diff"		options		recolor=-4
done
	"\n"		reset

:udiff Idle
	*		reset
	"-"		udiffold	recolor=-1
	"+"		udiffnew	recolor=-1
	"@"		udiffhunkbegin	recolor=-1
	"\n"		reset

:udiffold FileOld
	*		udiffold
	"\n"		udiff

:udiffnew FileNew
	*		udiffnew
	"\n"		udiff

:udiffhunkbegin DiffStuff
	*		udiffhunkbegin
	"\n"		udiffhunk

:udiffhunk Idle
	*		reset
	"d"		goo		buffer
	"-"		udiffoldordel	recolor=-1
	"+"		udiffadd	recolor=-1
	" "		udiffctx	recolor=-1
	"@"		udiffhunkbegin	recolor=-1

:udiffoldordel Idle
	*		udiffdel	recolor=-2
	"\n"		udiffdel	recolor=-2 noeat
	"-"		udiffold	recolor=-2

:udiffdel DelLine
	*		udiffdel
	"\n"		udiffhunk

:udiffadd AddLine
	*		udiffadd
	"\n"		udiffhunk

:udiffctx Unchanged
	*		udiffctx
	"\n"		udiffhunk