blob: 4ccab1950f246322b269c5059d406d531b22011f [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim syntax file
2" Language: AmigaDos
Bram Moolenaare2719092015-01-10 15:09:25 +01003" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
4" Last Change: Oct 23, 2014
5" Version: 7
6" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_AMIGA
Bram Moolenaar071d4272004-06-13 20:20:40 +00007
8" For version 5.x: Clear all syntax items
9" For version 6.x: Quit when a syntax file was already loaded
10if version < 600
11 syntax clear
12elseif exists("b:current_syntax")
13 finish
14endif
15
16syn case ignore
17
18" Amiga Devices
19syn match amiDev "\(par\|ser\|prt\|con\|nil\):"
20
21" Amiga aliases and paths
22syn match amiAlias "\<[a-zA-Z][a-zA-Z0-9]\+:"
23syn match amiAlias "\<[a-zA-Z][a-zA-Z0-9]\+:[a-zA-Z0-9/]*/"
24
25" strings
Bram Moolenaar9964e462007-05-05 17:54:07 +000026syn region amiString start=+"+ end=+"+ oneline contains=@Spell
Bram Moolenaar071d4272004-06-13 20:20:40 +000027
28" numbers
29syn match amiNumber "\<\d\+\>"
30
31" Logic flow
32syn region amiFlow matchgroup=Statement start="if" matchgroup=Statement end="endif" contains=ALL
33syn keyword amiFlow skip endskip
34syn match amiError "else\|endif"
35syn keyword amiElse contained else
36
37syn keyword amiTest contained not warn error fail eq gt ge val exists
38
39" echo exception
40syn region amiEcho matchgroup=Statement start="\<echo\>" end="$" oneline contains=amiComment
41syn region amiEcho matchgroup=Statement start="^\.[bB][rR][aA]" end="$" oneline
42syn region amiEcho matchgroup=Statement start="^\.[kK][eE][tT]" end="$" oneline
43
44" commands
45syn keyword amiKey addbuffers copy fault join pointer setdate
46syn keyword amiKey addmonitor cpu filenote keyshow printer setenv
47syn keyword amiKey alias date fixfonts lab printergfx setfont
48syn keyword amiKey ask delete fkey list printfiles setmap
49syn keyword amiKey assign dir font loadwb prompt setpatch
50syn keyword amiKey autopoint diskchange format lock protect sort
51syn keyword amiKey avail diskcopy get magtape quit stack
52syn keyword amiKey binddrivers diskdoctor getenv makedir relabel status
53syn keyword amiKey bindmonitor display graphicdump makelink remrad time
54syn keyword amiKey blanker iconedit more rename type
55syn keyword amiKey break ed icontrol mount resident unalias
56syn keyword amiKey calculator edit iconx newcli run unset
57syn keyword amiKey cd endcli ihelp newshell say unsetenv
58syn keyword amiKey changetaskpri endshell info nocapslock screenmode version
59syn keyword amiKey clock eval initprinter nofastmem search wait
60syn keyword amiKey cmd exchange input overscan serial wbpattern
61syn keyword amiKey colors execute install palette set which
62syn keyword amiKey conclip failat iprefs path setclock why
63
64" comments
65syn cluster amiCommentGroup contains=amiTodo,@Spell
66syn case ignore
67syn keyword amiTodo contained todo
68syn case match
69syn match amiComment ";.*$" contains=amiCommentGroup
70
71" sync
72syn sync lines=50
73
74" Define the default highlighting.
75" For version 5.7 and earlier: only when not done already
76" For version 5.8 and later: only when an item doesn't have highlighting yet
77if version >= 508 || !exists("did_amiga_syn_inits")
78 if version < 508
79 let did_amiga_syn_inits = 1
80 command -nargs=+ HiLink hi link <args>
81 else
82 command -nargs=+ HiLink hi def link <args>
83 endif
84
85 HiLink amiAlias Type
86 HiLink amiComment Comment
87 HiLink amiDev Type
88 HiLink amiEcho String
89 HiLink amiElse Statement
90 HiLink amiError Error
91 HiLink amiKey Statement
92 HiLink amiNumber Number
93 HiLink amiString String
94 HiLink amiTest Special
95
96 delcommand HiLink
97endif
98
99let b:current_syntax = "amiga"
100
101" vim:ts=15