|
| 1 | +" Vim syntax file |
| 2 | +" Language: lojban |
| 3 | +" Maintainer: Devyn Cairns <[email protected]> |
| 4 | +" Latest Revision: 26 June 2012 |
| 5 | + |
| 6 | +if exists("b:current_syntax") |
| 7 | + finish |
| 8 | +endif |
| 9 | + |
| 10 | +if version >= 600 |
| 11 | + setlocal iskeyword+=',.,, |
| 12 | +endif |
| 13 | + |
| 14 | +syn case ignore |
| 15 | + |
| 16 | +syn match jbo_cmevla "\<[abcdefgijklmnoprstuvxyz,.']\+[bcdfgjklmnprstvxz]\.\=\>" |
| 17 | + |
| 18 | +syn match jbo_fuhivla "\<[abcdefgijklmnoprstuvxz,']\{-,3}[bcdfgjklmnprstvxz]\{2}[abcdefgijklmnoprstuvxz,']*[aoeui]\>" |
| 19 | + |
| 20 | +syn match jbo_numeric "ci'i\|ka'o\|no'o\|pai\|te'o\|tu'o\|dau\|fei\|gai\|jau\|rei\|vai\|xei\|\(xo\|no\|pa\|re\|ci\|vo\|mu\|xa\|ze\|bi\|so\)['aoeuiy]\@!" contained |
| 21 | +syn match jbo_numeric "[0-9]" contained |
| 22 | +syn match jbo_num_oper "ce'i\|fi'u\|ki'o\|ma'u\|me'i\|ni'u\|pi'e\|ra'e\|za'u\|da'a\|du'e\|ji'i\|mo'a\|so'a\|so'e\|so'i\|so'o\|so'u\|su'e\|su'o\|rau\|\(pi\|ro\)['aoeuiy]\@!" contained |
| 23 | +syn match jbo_special "ni'o\|no'i\|\(\<\|\.\)i['aoeuiy]\@!" contained |
| 24 | + |
| 25 | +syn match jbo_gismu "\<[bcdfgjklmnprstvxz]\([aoeui][bcdfgjklmnprstvxz]\|[bcdfgjklmnprstvxz][aoeui]\)[bcdfgjklmnprstvxz][aoeui]\>" |
| 26 | + |
| 27 | +syn match jbo_lujvo "\<\([bcdfgjklmnprstvxz][bcdfgjklmnprstvxz][aoeui]\|[bcdfgjklmnprstvxz][aoeui]\([bcdfgjklmnprstvxz]y\=\|[aoeui][rn]\=\|'[aoeui][rn]\=\)\|[bcdfgjklmnprstvxz]\([aoeui][bcdfgjklmnprstvxz]\|[bcdfgjklmnprstvxyz[aoeui]\)[bcdfgjklmnprstvxz]y\)\+\([bcdfgjklmnprstvxz][bcdfgjklmnprstvxz][aoeui]\|[bcdfgjklmnprstvxz][aoeui]\([bcdfgjklmnprstvxz]\|[aoeui]\|'[aoeui]\)\|[bcdfgjklmnprstvxz]\([aoeui][bcdfgjklmnprstvxz]\|[bcdfgjklmnprstvxyz][aoeui]\)[bcdfgjklmnprstvxz][aoeui]\)\>" |
| 28 | + |
| 29 | +syn match jbo_cmavo "\<\(y\('y\)\=\|[aoeui]'[aoeui]\|[aoeui][aoeui]\=\)\(\.y\('y\)\=\|\.[aoeui]'[aoeui]\|\.[aoeui][aoeui]\=\|[bcdfgjklmnprstvxz]\(y\|[aoeui]\('[aoeui]\)\=[aoeui]\=\)\)*\>" contains=jbo_numeric,jbo_num_oper,jbo_special |
| 30 | +syn match jbo_cmavo "\<\([0-9]\|\.y\('y\)\=\|\.[aoeui]'[aoeui]\|\.[aoeui][aoeui]\=\|[bcdfgjklmnprstvxz]\(y\|[aoeui]\('[aoeui]\)\=[aoeui]\=\)\)\+\>" contains=jbo_numeric,jbo_num_oper,jbo_special |
| 31 | + |
| 32 | +syn match jbo_cmavo "\<zo'oi\>" nextgroup=jbo_quote_single skipwhite |
| 33 | +syn match jbo_cmavo "\<la'oi\>" nextgroup=jbo_quote_single skipwhite |
| 34 | +syn match jbo_cmavo "\<me'oi\>" nextgroup=jbo_quote_single skipwhite |
| 35 | + |
| 36 | +syn region jbo_zoi start="\<\(zoi\|la'o\)\s\+\.\=\z([^[:space:]]\+\)\.\=\>" end="\<\.\=\z1\.\=\>" fold |
| 37 | + |
| 38 | +syn match jbo_quote_single "[^[:space:]]\+" contained |
| 39 | + |
| 40 | +syn sync minlines=5 maxlines=300 |
| 41 | + |
| 42 | +let b:current_syntax = "lojban" |
| 43 | + |
| 44 | +hi link jbo_cmavo Operator |
| 45 | +hi link jbo_lujvo Statement |
| 46 | +hi link jbo_gismu Statement |
| 47 | +hi link jbo_fuhivla Statement |
| 48 | +hi link jbo_zoi String |
| 49 | +hi link jbo_quote_single Constant |
| 50 | +hi link jbo_numeric Number |
| 51 | +hi link jbo_num_oper Delimiter |
| 52 | +hi link jbo_special Function |
| 53 | +hi link jbo_cmevla Identifier |
0 commit comments