-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathami.vim
37 lines (30 loc) · 1023 Bytes
/
ami.vim
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
" Vim syntax for A-Mi
"
" To load syntax manually:
" :source ami.vim
"
" To load syntax automatically:
" - copy ami.vim into folder ~/.vim/syntax/
" - create a file ~/.vim/ftdetect/ami.vim containing the line
" autocmd BufNewFile,BufRead *.ami setf ami
if exists("b:current_syntax")
finish
endif
syn keyword amiCommand phi goto branch exit read write
syn match amiOp '[+\-*/%~|^&?:<>=\[,\]]'
syn match amiInteger '-\?\(0x[0-9a-fA-F]\+\|\d\+\)'
syn match amiLabel '@[.a-zA-Z0-9_]\+'
syn match amiReg '%[.a-zA-Z0-9_]\+'
syn region amiBrkPt start='^\s*brkpt' end='$'
syn region amiMeta start='#!' start='@!' start='%!' end=':'
syn match amiComment ';.*$' contains=amiMeta
let b:current_syntax = "ami"
" run :h syntax to find the supported colour names
hi def link amiCommand Statement
hi def link amiOp Operator
hi def link amiInteger Constant
hi def link amiReg Type
hi def link amiLabel Identifier
hi def link amiComment Comment
hi def link amiMeta PreProc
hi def link amiBrkPt Todo