Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1 | " Vim syntax file |
| 2 | " Language: AmigaDos |
Christian Brabandt | f9ca139 | 2024-02-19 20:37:11 +0100 | [diff] [blame] | 3 | " Maintainer: This runtime file is looking for a new maintainer. |
| 4 | " Former Maintainer: Charles E. Campbell |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 5 | " Last Change: Aug 31, 2016 |
Bram Moolenaar | 1d9215b | 2020-01-25 13:27:42 +0100 | [diff] [blame] | 6 | " Version: 10 |
Christian Brabandt | f9ca139 | 2024-02-19 20:37:11 +0100 | [diff] [blame] | 7 | " Former URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_AMIGA |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 8 | |
Bram Moolenaar | 89bcfda | 2016-08-30 23:26:57 +0200 | [diff] [blame] | 9 | " quit when a syntax file was already loaded |
| 10 | if exists("b:current_syntax") |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 11 | finish |
| 12 | endif |
| 13 | |
| 14 | syn case ignore |
| 15 | |
| 16 | " Amiga Devices |
| 17 | syn match amiDev "\(par\|ser\|prt\|con\|nil\):" |
| 18 | |
| 19 | " Amiga aliases and paths |
| 20 | syn match amiAlias "\<[a-zA-Z][a-zA-Z0-9]\+:" |
| 21 | syn match amiAlias "\<[a-zA-Z][a-zA-Z0-9]\+:[a-zA-Z0-9/]*/" |
| 22 | |
| 23 | " strings |
Bram Moolenaar | 9964e46 | 2007-05-05 17:54:07 +0000 | [diff] [blame] | 24 | syn region amiString start=+"+ end=+"+ oneline contains=@Spell |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 25 | |
| 26 | " numbers |
| 27 | syn match amiNumber "\<\d\+\>" |
| 28 | |
| 29 | " Logic flow |
| 30 | syn region amiFlow matchgroup=Statement start="if" matchgroup=Statement end="endif" contains=ALL |
| 31 | syn keyword amiFlow skip endskip |
| 32 | syn match amiError "else\|endif" |
| 33 | syn keyword amiElse contained else |
| 34 | |
| 35 | syn keyword amiTest contained not warn error fail eq gt ge val exists |
| 36 | |
| 37 | " echo exception |
| 38 | syn region amiEcho matchgroup=Statement start="\<echo\>" end="$" oneline contains=amiComment |
| 39 | syn region amiEcho matchgroup=Statement start="^\.[bB][rR][aA]" end="$" oneline |
| 40 | syn region amiEcho matchgroup=Statement start="^\.[kK][eE][tT]" end="$" oneline |
| 41 | |
| 42 | " commands |
| 43 | syn keyword amiKey addbuffers copy fault join pointer setdate |
| 44 | syn keyword amiKey addmonitor cpu filenote keyshow printer setenv |
| 45 | syn keyword amiKey alias date fixfonts lab printergfx setfont |
| 46 | syn keyword amiKey ask delete fkey list printfiles setmap |
| 47 | syn keyword amiKey assign dir font loadwb prompt setpatch |
| 48 | syn keyword amiKey autopoint diskchange format lock protect sort |
| 49 | syn keyword amiKey avail diskcopy get magtape quit stack |
| 50 | syn keyword amiKey binddrivers diskdoctor getenv makedir relabel status |
| 51 | syn keyword amiKey bindmonitor display graphicdump makelink remrad time |
| 52 | syn keyword amiKey blanker iconedit more rename type |
| 53 | syn keyword amiKey break ed icontrol mount resident unalias |
| 54 | syn keyword amiKey calculator edit iconx newcli run unset |
| 55 | syn keyword amiKey cd endcli ihelp newshell say unsetenv |
| 56 | syn keyword amiKey changetaskpri endshell info nocapslock screenmode version |
| 57 | syn keyword amiKey clock eval initprinter nofastmem search wait |
| 58 | syn keyword amiKey cmd exchange input overscan serial wbpattern |
| 59 | syn keyword amiKey colors execute install palette set which |
| 60 | syn keyword amiKey conclip failat iprefs path setclock why |
| 61 | |
| 62 | " comments |
| 63 | syn cluster amiCommentGroup contains=amiTodo,@Spell |
| 64 | syn case ignore |
| 65 | syn keyword amiTodo contained todo |
| 66 | syn case match |
| 67 | syn match amiComment ";.*$" contains=amiCommentGroup |
| 68 | |
| 69 | " sync |
| 70 | syn sync lines=50 |
| 71 | |
| 72 | " Define the default highlighting. |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 73 | if !exists("skip_amiga_syntax_inits") |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 74 | |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 75 | hi def link amiAlias Type |
| 76 | hi def link amiComment Comment |
| 77 | hi def link amiDev Type |
| 78 | hi def link amiEcho String |
| 79 | hi def link amiElse Statement |
| 80 | hi def link amiError Error |
| 81 | hi def link amiKey Statement |
| 82 | hi def link amiNumber Number |
| 83 | hi def link amiString String |
| 84 | hi def link amiTest Special |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 85 | |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 86 | endif |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 87 | let b:current_syntax = "amiga" |
| 88 | |
| 89 | " vim:ts=15 |