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