adding vim

This commit is contained in:
Hunter Haugen 2009-09-04 14:08:46 -07:00
parent 1b1e9fb734
commit 357b651f15
24 changed files with 14313 additions and 0 deletions

595
.vim/syntax/asmx86.vim Normal file
View file

@ -0,0 +1,595 @@
" Vim syntax file
" Hacked by Adam, from the 68000 asm syntax....
" x Language: Motorola 68000 Assembler
" x Maintainer: Steve Wall
" Last change: 2001 May 01
"
" This is incomplete. In particular, support for 68020 and
" up and 68851/68881 co-processors is partial or non-existant.
" Feel free to contribute...
"
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
syn case ignore
" syn region asmx86Comment start="#\(\(\(include\)\|\(define\)\|\(if\)\|\(ifndef\)\|\(endif\)\|\(end\)\|\(ifdef\)\)\s\)\!" end="$"
syn region asmx86Commenthash start="#\(\(define\)\|\(if\(n\=\(def\)\)\=\)\|\(include\)\|\(error\)\|\(end\(if\)\=\)\)\!" end="$" contains=asmx86Todo
syn region asmx86Commenthash start="#" end="$" contains=asmx86Todo
syn match asmx86Operator "[-+*/]" " Must occur before Comments
syn match asmx86PreProc "^\s*#\s*\(\(if\(n\=\(def\)\)\=\)\|\(end\(if\)\=\)\|\(define\)\|\(error\)\|\(else\)\)\>"
syn region asmx86Commentcpp start="\s*#\s*if\s\+0\+\>" end="\s*#\s*endif\>" contains=asmx86Todo
syn region asmx86Commentcxx start="//" end="$" contains=asmx86Todo
syn region asmx86Commentc start="/\*" end="\*/" contains=asmx86Todo
" Preprocessor, basics:
" First make ALL things that are behind #'s and the endline as comments. Then
" boil out the stuff that is vaild, like #defines, and such.... It's
" kinda tough, since we're allowing two conflicting syntaxes. But when we
" consider that the "#" mechanism in the pre-processor isn't ever seen by the
" underlying language, it begins to show itself, on why it is so weird.
" There's going to be "#"'es left behind by the cpp, so we need to remember
" that the assembler will see those as commments. We provide this commenting
" Segment Registers --
syn match asmx86Reg "%[cdefgs]s"
" Partial list of register symbols
" General Purpose Registers --
"syn keyword asmx86Reg eax ax al ah
syn match asmx86Reg "%[abcd][xhl]"
syn match asmx86Reg "%e[abcd]x"
" syn keyword asmx86Reg ebx bx bl bh
" syn keyword asmx86Reg ecx cx cl ch
" syn keyword asmx86Reg edx dx dl dh
" "Special" Registers --
"syn keyword asmx86Reg ebp bp edi di esi si esp sp
syn match asmx86Reg "%[bs]p"
syn match asmx86Reg "%e[bs]p"
syn match asmx86Reg "%[ds]i"
syn match asmx86Reg "%e[ds]i"
" Protection, extra, and magic registers for all the OS-type fun stuff --
syn match asmx86Reg "%[cd]r[0-3]"
syn match asmx86Reg "%[td]r[3-7]"
" syn keyword asmx86Reg cr0 cr1 cr2 cr3
" syn keyword asmx86Reg tr3 tr4 tr5 tr6 tr7
" syn keyword asmx86Reg dr0 dr1 dr2 dr3 dr4 dr5 dr6 dr7
syn keyword asmx86Reg gdtr ldtr idtr tr msw pdbr pfla
" Page descriptor base register and page fault linear address
" MC68010
"syn keyword asmx86Reg vbr sfc sfcr dfc dfcr
" MC68020
"syn keyword asmx86Reg msp isp zpc cacr caar
"syn keyword asmx86Reg za0 za1 za2 za3 za4 za5 za6 za7
"syn keyword asmx86Reg zd0 zd1 zd2 zd3 zd4 zd5 zd6 zd7
" MC68030
"syn keyword asmx86Reg crp srp tc ac0 ac1 acusr tt0 tt1 mmusr
" MC68040
"syn keyword asmx86Reg dtt0 dtt1 itt0 itt1 urp
" MC68851 registers
"syn keyword asmx86Reg cal val scc crp srp drp tc ac psr pcsr
"syn keyword asmx86Reg bac0 bac1 bac2 bac3 bac4 bac5 bac6 bac7
"syn keyword asmx86Reg bad0 bad1 bad2 bad3 bad4 bad5 bad6 bad7
" MC68881/82 registers
"syn keyword asmx86Reg fp0 fp1 fp2 fp3 fp4 fp5 fp6 fp7
"syn keyword asmx86Reg control status iaddr fpcr fpsr fpiar
"Not sure if this is the case for x86......
" M68000 opcodes - order is important!
syn match asmx86Opcode "\<aa[asdm][bwl]\=\s"
syn match asmx86Opcode "\<ad[cd][bwl]\=\s"
syn match asmx86Opcode "\<and[bwl]\=\s"
syn match asmx86Opcode "\<arpl\s"
syn match asmx86Opcode_br "\<bound[lw]\=\s"
syn match asmx86Opcode "\<bs[rf][lw]\=\s"
syn match asmx86Opcode "\<bswap[lw]\=\s"
syn match asmx86Opcode "\<bt[rcs]\=[lw]\=\s"
syn match asmx86Opcode_br "\<call[f]\=\s"
syn match asmx86Opcode "\<cbw\s"
syn match asmx86Opcode "\<cwde\s"
syn match asmx86Opcode "\<cl\([cdi]\|\(ts\)\)\>"
syn match asmx86Opcode "\<cmc\s"
syn match asmx86Opcode "\<cmp\(xchg\)\=[bwl]\=\s"
syn match asmx86Opcode "\<cmps[bwdl]\=\>"
syn match asmx86Opcode "\<c\(\(wd\)\|\(dq\)\)\s"
syn match asmx86Opcode "\<da[sd]\=\s"
syn match asmx86Opcode "\<dec[bwl]\=\s"
syn match asmx86Opcode "\<div[bwl]\=\s"
syn match asmx86Opcode "\<enter[bwl]\=\s"
" Skipping all FPU instructions.....
syn match asmx86Opcode_br "\<hlt\>"
syn match asmx86Opcode "\<idiv[bwl]\=\s"
syn match asmx86Opcode "\<imul[bwl]\=\s"
syn match asmx86Opcode_io "\<in[bwl]\=\s"
syn match asmx86Opcode_io "\<ins[bwdl]\=\>"
syn match asmx86Opcode "\<inc[bwl]\=\s"
syn match asmx86Opcode_br "\<int\s"
syn match asmx86Opcode_br "\<int[o3]\>"
syn match asmx86Opcode "\<inv\(\(d\)\|\(lpg\)\)\s"
syn match asmx86Opcode_br "\<iretd\=\>"
"" Main x86 branch instructions...
syn match asmx86Opcode_br "\<j.\{,4}\s"
" This is, above, the hack. It will not show valid/invalid jcc opcodes, now...
" This will be fixed later, this is just to have working j???? working now....
syn match asmx86Opcode_br "\<l\=jmp[fblwd]\=\s"
syn match asmx86Opcode "\<lahf\s"
syn match asmx86Opcode "\<lar\s"
syn match asmx86Opcode_mv "\<lea[lw]\=\s"
syn match asmx86Opcode "\<leave\>"
syn match asmx86Opcode_mv "\<l[gil]dtl\=\s"
syn match asmx86Opcode_mv "\<l[defgs]s\s"
syn match asmx86Opcode_mv "\<lmsw\s"
syn match asmx86Opcode "\<lock\>"
syn match asmx86Opcode_mv "\<lods[lwdb]\=\>"
syn match asmx86Opcode_br "\<loopn\=[ez]\=\s"
syn match asmx86Opcode_mv "\<lsl\s"
syn match asmx86Opcode_mv "\<ltr\s"
syn match asmx86Opcode_mv "\<mov[bwl]\=\s"
syn match asmx86Opcode_mv "\<movs[lwdb]\=\>"
syn match asmx86Opcode_mv "\<movsx[bwl]\=\s"
syn match asmx86Opcode_mv "\<movzx[bwl]\=\s"
syn match asmx86Opcode "\<mul[bwl]\=\s"
syn match asmx86Opcode "\<neg[bwl]\=\s"
syn match asmx86Opcode "\<nop\>"
syn match asmx86Opcode "\<not[bwl]\=\s"
syn match asmx86Opcode "\<or[bwl]\=\s"
syn match asmx86Opcode_io "\<out[bwl]\=\s"
syn match asmx86Opcode_io "\<outs[dbwl]\=\>"
syn match asmx86Opcode_mv "\<pop[bwl]\=\s"
syn match asmx86Opcode_mv "\<pop[af][wld]\=\>"
syn match asmx86Opcode_mv "\<push[bwl]\=\s"
syn match asmx86Opcode_mv "\<push[af][wld]\=\>"
syn match asmx86Opcode "\<r[co][rl][bwl]\=\s"
syn match asmx86Opcode_pre "\<repn\=[ez]\=\s"
syn match asmx86Opcode_br "\<retf\=\>"
syn match asmx86Opcode "\<sahf\>"
syn match asmx86Opcode "\<s[ah][rl][bwl]\=\s"
syn match asmx86Opcode "\<sbb[bwl]\=\s"
syn match asmx86Opcode "\<scas[bwld]\=\s"
syn match asmx86Opcode "\<set.\{,3}\s"
" We do the same hack as a jmp here. We'll only allow the valid ones, later.
syn match asmx86Opcode_mv "\<s[gil]dtl\=\s"
syn match asmx86Opcode "\<sh[lr][dbwl]\=\s"
syn match asmx86Opcode_mv "\<smsw\s"
syn match asmx86Opcode "\<st[cdi]\>"
syn match asmx86Opcode_mv "\<stos[bwld]\=\>"
syn match asmx86Opcode_mv "\<str\s"
syn match asmx86Opcode "\<sub[bwl]\=\s"
syn match asmx86Opcode "\<test[bwl]\=\s"
syn match asmx86Opcode "\<ver[rw]\s"
syn match asmx86Opcode "\<wait\>"
syn match asmx86Opcode "\<wbinvd\>"
syn match asmx86Opcode_mv "\<xadd[bwl]\=\s"
syn match asmx86Opcode_mv "\<xchg[bwl]\=\s"
syn match asmx86Opcode_mv "\<xlatb\=\>"
syn match asmx86Opcode "\<xor[bwl]\=\s"
" 68k instructions... here, because they are sometimes matching, and we haven't
" gotten the x86 ones up to speed yet....
" syn match asmx86Opcode "\<abcd\(\.b\)\=\s"
" syn match asmx86Opcode "\<adda\(\.[wl]\)\=\s"
" syn match asmx86Opcode "\<addi\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<addq\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<addx\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<add\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<andi\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<and\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<as[lr]\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<b[vc][cs]\(\.[bwls]\)\=\s"
" syn match asmx86Opcode "\<beq\(\.[bwls]\)\=\s"
" syn match asmx86Opcode "\<bg[et]\(\.[bwls]\)\=\s"
" syn match asmx86Opcode "\<b[hm]i\(\.[bwls]\)\=\s"
" syn match asmx86Opcode "\<bl[est]\(\.[bwls]\)\=\s"
" syn match asmx86Opcode "\<bne\(\.[bwls]\)\=\s"
" syn match asmx86Opcode "\<bpl\(\.[bwls]\)\=\s"
" syn match asmx86Opcode "\<bchg\(\.[bl]\)\=\s"
" syn match asmx86Opcode "\<bclr\(\.[bl]\)\=\s"
" syn match asmx86Opcode "\<bfchg\s"
" syn match asmx86Opcode "\<bfclr\s"
" syn match asmx86Opcode "\<bfexts\s"
" syn match asmx86Opcode "\<bfextu\s"
" syn match asmx86Opcode "\<bfffo\s"
" syn match asmx86Opcode "\<bfins\s"
" syn match asmx86Opcode "\<bfset\s"
" syn match asmx86Opcode "\<bftst\s"
" syn match asmx86Opcode "\<bkpt\s"
" syn match asmx86Opcode "\<bra\(\.[bwls]\)\=\s"
" syn match asmx86Opcode "\<bset\(\.[bl]\)\=\s"
" syn match asmx86Opcode "\<bsr\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<btst\(\.[bl]\)\=\s"
" syn match asmx86Opcode "\<callm\s"
" syn match asmx86Opcode "\<cas2\(\.[wl]\)\=\s"
" syn match asmx86Opcode "\<cas\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<chk2\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<chk\(\.[wl]\)\=\s"
" syn match asmx86Opcode "\<clr\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<cmpa\(\.[wl]\)\=\s"
" syn match asmx86Opcode "\<cmpi\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<cmpm\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<cmp2\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<cmp\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<db[cv][cs]\(\.w\)\=\s"
" syn match asmx86Opcode "\<dbeq\(\.w\)\=\s"
" syn match asmx86Opcode "\<db[ft]\(\.w\)\=\s"
" syn match asmx86Opcode "\<dbg[et]\(\.w\)\=\s"
" syn match asmx86Opcode "\<db[hm]i\(\.w\)\=\s"
" syn match asmx86Opcode "\<dbl[est]\(\.w\)\=\s"
" syn match asmx86Opcode "\<dbne\(\.w\)\=\s"
" syn match asmx86Opcode "\<dbpl\(\.w\)\=\s"
" syn match asmx86Opcode "\<dbra\(\.w\)\=\s"
" syn match asmx86Opcode "\<div[su]\(\.[wl]\)\=\s"
" syn match asmx86Opcode "\<div[su]l\(\.l\)\=\s"
" syn match asmx86Opcode "\<eori\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<eor\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<exg\(\.l\)\=\s"
" syn match asmx86Opcode "\<extb\(\.l\)\=\s"
" syn match asmx86Opcode "\<ext\(\.[wl]\)\=\s"
" syn match asmx86Opcode "\<illegal\>"
" syn match asmx86Opcode "\<jmp\(\.[ls]\)\=\s"
" syn match asmx86Opcode "\<jsr\(\.[ls]\)\=\s"
" syn match asmx86Opcode "\<lea\(\.l\)\=\s"
" syn match asmx86Opcode "\<link\(\.[wl]\)\=\s"
" syn match asmx86Opcode "\<ls[lr]\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<movea\(\.[wl]\)\=\s"
" syn match asmx86Opcode "\<movec\(\.l\)\=\s"
" syn match asmx86Opcode "\<movem\(\.[wl]\)\=\s"
" syn match asmx86Opcode "\<movep\(\.[wl]\)\=\s"
" syn match asmx86Opcode "\<moveq\(\.l\)\=\s"
" syn match asmx86Opcode "\<moves\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<move\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<mul[su]\(\.[wl]\)\=\s"
" syn match asmx86Opcode "\<nbcd\(\.b\)\=\s"
" syn match asmx86Opcode "\<negx\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<neg\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<nop\>"
" syn match asmx86Opcode "\<not\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<ori\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<or\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<pack\s"
" syn match asmx86Opcode "\<pea\(\.l\)\=\s"
" syn match asmx86Opcode "\<reset\>"
" syn match asmx86Opcode "\<ro[lr]\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<rox[lr]\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<rt[dm]\s"
" syn match asmx86Opcode "\<rt[ers]\>"
" syn match asmx86Opcode "\<sbcd\(\.b\)\=\s"
" syn match asmx86Opcode "\<s[cv][cs]\(\.b\)\=\s"
" syn match asmx86Opcode "\<seq\(\.b\)\=\s"
" syn match asmx86Opcode "\<s[ft]\(\.b\)\=\s"
" syn match asmx86Opcode "\<sg[et]\(\.b\)\=\s"
" syn match asmx86Opcode "\<s[hm]i\(\.b\)\=\s"
" syn match asmx86Opcode "\<sl[est]\(\.b\)\=\s"
" syn match asmx86Opcode "\<sne\(\.b\)\=\s"
" syn match asmx86Opcode "\<spl\(\.b\)\=\s"
" syn match asmx86Opcode "\<suba\(\.[wl]\)\=\s"
" syn match asmx86Opcode "\<subi\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<subq\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<subx\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<sub\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<swap\(\.w\)\=\s"
" syn match asmx86Opcode "\<tas\(\.b\)\=\s"
" syn match asmx86Opcode "\<tdiv[su]\(\.l\)\=\s"
" syn match asmx86Opcode "\<t\(rap\)\=[cv][cs]\(\.[wl]\)\=\s"
" syn match asmx86Opcode "\<t\(rap\)\=eq\(\.[wl]\)\=\s"
" syn match asmx86Opcode "\<t\(rap\)\=[ft]\(\.[wl]\)\=\s"
" syn match asmx86Opcode "\<t\(rap\)\=g[et]\(\.[wl]\)\=\s"
" syn match asmx86Opcode "\<t\(rap\)\=[hm]i\(\.[wl]\)\=\s"
" syn match asmx86Opcode "\<t\(rap\)\=l[est]\(\.[wl]\)\=\s"
" syn match asmx86Opcode "\<t\(rap\)\=ne\(\.[wl]\)\=\s"
" syn match asmx86Opcode "\<t\(rap\)\=pl\(\.[wl]\)\=\s"
" syn match asmx86Opcode "\<t\(rap\)\=v\>"
" syn match asmx86Opcode "\<t\(rap\)\=[cv][cs]\>"
" syn match asmx86Opcode "\<t\(rap\)\=eq\>"
" syn match asmx86Opcode "\<t\(rap\)\=[ft]\>"
" syn match asmx86Opcode "\<t\(rap\)\=g[et]\>"
" syn match asmx86Opcode "\<t\(rap\)\=[hm]i\>"
" syn match asmx86Opcode "\<t\(rap\)\=l[est]\>"
" syn match asmx86Opcode "\<t\(rap\)\=ne\>"
" syn match asmx86Opcode "\<t\(rap\)\=pl\>"
" syn match asmx86Opcode "\<trap\s"
" syn match asmx86Opcode "\<tst\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<unlk\s"
" syn match asmx86Opcode "\<unpk\s"
" Valid labels
syn match asmx86Label "^[a-z_?.][a-z0-9_?.$]*$"
syn match asmx86Label "^[a-z_?.][a-z0-9_?.$]*\s"he=e-1
syn match asmx86Label "^\s*[a-z_?.][a-z0-9_?.$]*:"he=e-1
" Various number formats
syn match hexNumber "\$[0-9a-fA-F]\+\>"
syn match hexNumber "$0x[0-9a-fA-F]\+\>"
syn match hexNumber "0x[0-9a-fA-F]\+\>"
syn match hexNumber "\<[0-9][0-9a-fA-F]*H\>"
syn match octNumber "@[0-7]\+\>"
syn match octNumber "\<[0-7]\+[QO]\>"
syn match binNumber "%[01]\+\>"
syn match binNumber "\<[01]\+B\>"
syn match decNumber "\<[0-9]\+D\=\>"
syn match floatE "_*E_*" contained
syn match floatExponent "_*E_*[-+]\=[0-9]\+" contained contains=floatE
syn match floatNumber "[-+]\=[0-9]\+_*E_*[-+]\=[0-9]\+" contains=floatExponent
syn match floatNumber "[-+]\=[0-9]\+\.[0-9]\+\(E[-+]\=[0-9]\+\)\=" contains=floatExponent
syn match floatNumber ":\([0-9a-f]\+_*\)\+"
" Character string constants
"syn match asmx86StringError "'[ -~]*'"
"syn match asmx86StringError "'[ -~]*$"
"syn region asmx86String start="'" skip="''" end="'" oneline contains=asmx86CharError
syn match asmx86CharError "[^ -~]" contained
" Immediate data
" syn match asmx86Immediate "#\$[0-9a-fA-F]\+" contains=hexNumber
" syn match asmx86Immediate "#[0-9][0-9a-fA-F]*H" contains=hexNumber
" syn match asmx86Immediate "#@[0-7]\+" contains=octNumber
" syn match asmx86Immediate "#[0-7]\+[QO]" contains=octNumber
" syn match asmx86Immediate "#%[01]\+" contains=binNumber
" syn match asmx86Immediate "#[01]\+B" contains=binNumber
" syn match asmx86Immediate "#[0-9]\+D\=" contains=decNumber
syn match asmx86Symbol "[a-z_?.][a-z0-9_?.$]*" contained
" syn match asmx86Immediate "#[a-z_?.][a-z0-9_?.]*" contains=asmx86Symbol
" Special items for comments
syn keyword asmx86Todo contained TODO XXX FIXME CHANGED
" Operators
syn match asmx86Operator "\.SIZEOF\."
syn match asmx86Operator "\.STARTOF\."
syn match asmx86Operator "<<" " shift left
syn match asmx86Operator ">>" " shift right
syn match asmx86Operator "&" " bit-wise logical and
syn match asmx86Operator "!" " bit-wise logical or
syn match asmx86Operator "!!" " exclusive or
syn match asmx86Operator "<>" " inequality
syn match asmx86Operator "=" " must be before other ops containing '='
syn match asmx86Operator ">="
syn match asmx86Operator "<="
syn match asmx86Operator "==" " operand existance - used in macro definitions
" Condition code style operators
syn match asmx86Operator "<[CV][CS]>"
syn match asmx86Operator "<EQ>"
syn match asmx86Operator "<G[TE]>"
syn match asmx86Operator "<[HM]I>"
syn match asmx86Operator "<L[SET]>"
syn match asmx86Operator "<NE>"
syn match asmx86Operator "<PL>"
" Include
syn match asmx86Include "\<INCLUDE\s"
syn region asmIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+
syn match asmx86Included display contained "<[^"]*>"
syn match asmx86Include display "^\s*#\s*include\>\s*["<]" contains=asmx86Included
" Comments
" syn match asmx86Comment ";.*" contains=asmx86Todo
" syn match asmx86Comment "#.*" contains=asmx86Todo
" syn match asmx86Comment "\s!.*"ms=s+1 contains=asmx86Todo
" syn match asmx86Comment "^\s*[*!].*" contains=asmx86Todo
" Standard macros
syn match asmx86Cond "\<IF\(\.[BWL]\)\=\s"
syn match asmx86Cond "\<THEN\(\.[SL]\)\=\>"
syn match asmx86Cond "\<ELSE\(\.[SL]\)\=\>"
syn match asmx86Cond "\<ENDI\>"
syn match asmx86Cond "\<BREAK\(\.[SL]\)\=\>"
syn match asmx86Repeat "\<FOR\(\.[BWL]\)\=\s"
syn match asmx86Repeat "\<DOWNTO\s"
syn match asmx86Repeat "\<TO\s"
syn match asmx86Repeat "\<BY\s"
syn match asmx86Repeat "\<DO\(\.[SL]\)\=\>"
syn match asmx86Repeat "\<ENDF\>"
syn match asmx86Repeat "\<NEXT\(\.[SL]\)\=\>"
syn match asmx86Repeat "\<REPEAT\>"
syn match asmx86Repeat "\<UNTIL\(\.[BWL]\)\=\s"
syn match asmx86Repeat "\<WHILE\(\.[BWL]\)\=\s"
syn match asmx86Repeat "\<ENDW\>"
" Macro definition
syn match asmx86Macro "\<MACRO\>"
syn match asmx86Macro "\<LOCAL\s"
syn match asmx86Macro "\<MEXIT\>"
syn match asmx86Macro "\<ENDM\>"
syn match asmx86MacroParam "\\[0-9]"
" Conditional assembly
syn match asmx86PreCond "\<IFC\s"
syn match asmx86PreCond "\<IFDEF\s"
syn match asmx86PreCond "\<IFEQ\s"
syn match asmx86PreCond "\<IFGE\s"
syn match asmx86PreCond "\<IFGT\s"
syn match asmx86PreCond "\<IFLE\s"
syn match asmx86PreCond "\<IFLT\s"
syn match asmx86PreCond "\<IFNC\>"
syn match asmx86PreCond "\<IFNDEF\s"
syn match asmx86PreCond "\<IFNE\s"
syn match asmx86PreCond "\<ELSEC\>"
syn match asmx86PreCond "\<ENDC\>"
" Loop control
syn match asmx86PreCond "\<REPT\s"
syn match asmx86PreCond "\<IRP\s"
syn match asmx86PreCond "\<IRPC\s"
syn match asmx86PreCond "\<ENDR\>"
" Directives
syn match asmx86Directive "\<ALIGN\s"
syn match asmx86Directive "\<CHIP\s"
syn match asmx86Directive "\<COMLINE\s"
syn match asmx86Directive "\<COMMON\(\.S\)\=\s"
syn match asmx86Directive "\<DC\(\.[BWLSDXP]\)\=\s"
syn match asmx86Directive "\<DC\.\\[0-9]\s"me=e-3 " Special use in a macro def
syn match asmx86Directive "\<DCB\(\.[BWLSDXP]\)\=\s"
syn match asmx86Directive "\<DS\(\.[BWLSDXP]\)\=\s"
syn match asmx86Directive "\<END\>"
syn match asmx86Directive "\<EQU\s"
syn match asmx86Directive "\<FEQU\(\.[SDXP]\)\=\s"
syn match asmx86Directive "\<FAIL\>"
syn match asmx86Directive "\<FOPT\s"
syn match asmx86Directive "\<\(NO\)\=FORMAT\>"
syn match asmx86Directive "\<IDNT\>"
syn match asmx86Directive "\<\(NO\)\=LIST\>"
syn match asmx86Directive "\<LLEN\s"
syn match asmx86Directive "\<MASK2\>"
syn match asmx86Directive "\<NAME\s"
syn match asmx86Directive "\<NOOBJ\>"
syn match asmx86Directive "\<OFFSET\s"
syn match asmx86Directive "\<OPT\>"
syn match asmx86Directive "\<ORG\(\.[SL]\)\=\>"
syn match asmx86Directive "\<\(NO\)\=PAGE\>"
syn match asmx86Directive "\<PLEN\s"
syn match asmx86Directive "\<REG\s"
syn match asmx86Directive "\<RESTORE\>"
syn match asmx86Directive "\<SAVE\>"
syn match asmx86Directive "\<SECT\(\.S\)\=\s"
syn match asmx86Directive "\<SECTION\(\.S\)\=\s"
syn match asmx86Directive "\<SET\s"
syn match asmx86Directive "\<SPC\s"
syn match asmx86Directive "\<TTL\s"
syn match asmx86Directive "\<XCOM\s"
syn match asmx86Directive "\<XDEF\s"
syn match asmx86Directive "\<XREF\(\.S\)\=\s"
syn match asmx86Constraint "\.[a-z]\+[a-z0-9]*\>"
syn match asmx86Constraintconst "\.\(\(byte\)\|\(d\=word\)\)\>"
syn case match
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_asmx86_syntax_inits")
if version < 508
let did_asmx86_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
" The default methods for highlighting. Can be overridden later
" Comment Constant Error Identifier PreProc Special Statement Todo Type
"
" Constant Boolean Character Number String
" Identifier Function
" PreProc Define Include Macro PreCondit
" Special Debug Delimiter SpecialChar SpecialComment Tag
" Statement Conditional Exception Keyword Label Operator Repeat
" Type StorageClass Structure Typedef
HiLink asmx86Comment DarkGrey
HiLink asmx86Commentcpp DarkGrey
HiLink asmx86Commentc DarkGrey
HiLink asmx86Commentcxx DarkGrey
HiLink asmx86Commenthash DarkGrey
HiLink asmx86Todo Todo
HiLink hexNumber Number " Constant
HiLink octNumber Number " Constant
HiLink binNumber Number " Constant
HiLink decNumber Number " Constant
HiLink floatNumber Number " Constant
HiLink floatExponent Number " Constant
HiLink floatE SpecialChar " Statement
"HiLink floatE Number " Constant
HiLink asmx86Immediate Identifier " Statement
"HiLink asmx86Symbol Constant
HiLink asmx86String String " Constant
HiLink asmx86Included String " Constant
HiLink asmx86CharError Error
HiLink asmx86StringError Error
HiLink asmx86Reg Identifier
HiLink asmx86Operator Identifier
HiLink asmx86Include Include " PreProc
HiLink asmx86Macro Macro " PreProc
HiLink asmx86PreProc PreProc " PreProc
HiLink asmx86MacroParam Keyword " Statement
HiLink asmx86Directive Special
HiLink asmx86PreCond Special
HiLink asmx86Constraint Keyword
HiLink asmx86Constraintconst Type
HiLink asmx86Opcode Keyword
HiLink asmx86Opcode_mv Special
HiLink asmx86Opcode_pre Todo
HiLink asmx86Opcode_br Macro
HiLink asmx86Opcode_io String
HiLink asmx86Opcode_o2 String
" We have "normal" opcodes, "move" opcodes, "prefix" opcodes, and "branch"
" opcodes..... Prefixes are rare, and we should alert them VERY specially
HiLink asmx86Cond Conditional " Statement
HiLink asmx86Repeat Repeat " Statement
HiLink asmx86Label Type
delcommand HiLink
endif
let b:current_syntax = "asmx86"
" vim: ts=8 sw=2

39
.vim/syntax/eruby.vim Normal file
View file

@ -0,0 +1,39 @@
" Vim syntax file
" Language: eruby
" Maintainer: Michael Brailsford <brailsmt@yahoo.com>
" Installation:
" To automatilcally load this file when a .rhtml file is opened, add the
" following lines to ~/.vim/filetype.vim:
"
" augroup filetypedetect
" au! BufRead,BufNewFile *.rhtml setfiletype eruby
" augroup END
"
" You will have to restart vim for this to take effect. In any case it
" is a good idea to read ":he new-filetype" so that you know what is going
" on, and why the above lines work.
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
"Source the html syntax file
ru! syntax/html.vim
"Set the filetype to html to load the html ftplugins
"set ft=html
unlet b:current_syntax
"Put the ruby syntax file in @rubyTop
syn include @rubyTop syntax/ruby.vim
syn region erubyBlock matchgroup=erubyRubyDelim start=#<%=\?# end=#%># keepend containedin=ALL contains=@rubyTop,erubyEnd
syn region erubyComment start=+<%#+ end=#%># keepend
syn match erubyEnd #\<end\>#
hi link erubyRubyDelim todo
hi link erubyComment comment
hi link erubyEnd rubyControl
" vim: set ts=4 sw=4:

113
.vim/syntax/haml.vim Normal file
View file

@ -0,0 +1,113 @@
" Vim syntax file
" Language: Haml (XHTML Abstraction Markup Language)
" Maintainer: Dmitry A. Ilyashevich <dmitry.ilyashevich@gmail.com>
" License: This file can be redistribued and/or modified under the same terms
" as Vim itself.
"
" Version: 0.3
" Last Change: 2008-03-16
" Notes: Last synced with Haml 1.8
" TODO: Support for indented multiline sections
"
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
"
" Changes:
" - David Bushong added support for Haml 1.8's == syntax for ruby strings;
" - Lasse Jansen make syntax highlighting of multiline ruby commands work
" ("|" at the end of the line).
"
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
if !exists("main_syntax")
let main_syntax = 'haml'
endif
if version < 600
so <sfile>:p:h/html.vim
syn include @rubyTop <sfile>:p:h/ruby.vim
else
runtime! syntax/html.vim
unlet b:current_syntax
syn include @rubyTop syntax/ruby.vim
endif
syn region hamlLineTag start="^\s*%[a-zA-Z0-9\-_\:]\+" end="$" oneline keepend contains=hamlHtmlTag,hamlCssClassIncluded,hamlCssIdIncluded,hamlHtmlTagEnd,hamlRubyCodeIncluded,hamlRubyHash,hamlSpecialChar
syn region hamlLineTag start="^\s*%[a-zA-Z0-9\-_\:]\+" end="$" oneline keepend contains=hamlHtmlTag,hamlCssClassIncluded,hamlCssIdIncluded,hamlHtmlTagEnd,hamlRubyCodeIncluded,hamlRubyHash,hamlRubyStringIncluded
syn match hamlHtmlTagEnd "/$" contained
syn match hamlHtmlTag "^\s*%[a-zA-Z0-9\-_\:]\+" contained contains=htmlTagName
syn match hamlCssClassIncluded "\.[a-zA-Z0-9\-_\:]\+" contained
syn match hamlCssIdIncluded "\#[a-zA-Z0-9\-_\:]\+" contained
syn region hamlLineClass start="^\s*\.[a-zA-Z0-9\-_\:]*" end="$" oneline keepend contains=hamlCssClass,hamlCssClassIncluded,hamlCssIdIncluded,hamlRubyCodeIncluded,hamlRubyStringIncluded
syn region hamlLineId start="^\s*\#[a-zA-Z0-9\-_\:]*" end="$" oneline keepend contains=hamlCssId,hamlCssClassIncluded,hamlCssIdIncluded,hamlRubyCodeIncluded,hamlRubyStringIncluded
syn match hamlCssId "^\s*#[a-zA-Z0-9\-_\:]*" contained
syn match hamlCssClass "^\s*\.[a-zA-Z0-9\-_\:]*" contained
syn region hamlRubyCodeIncluded matchgroup=Delimiter start="[=~-] " end="$" contained contains=@rubyTop,hamlRubyHash keepend
syn region hamlRubyHash matchgroup=Delimiter start="{" end="}" contained contains=@rubyTop keepend
syn region hamlRubyCode matchgroup=Delimiter start="^\s*[=~-]" end="$" contains=@rubyTop,hamlRubyHash keepend
syn region hamlRubyStringIncluded matchgroup=Delimiter start="== " end="$" contained contains=@rubyStringSpecial keepend
syn region hamlRubyString matchgroup=Delimiter start="^\s*==" end="$" contains=@rubyStringSpecial
syn match hamlPreDef "^\s*:[a-zA-Z0-9\-_\:]\+"
syn region hamlPreProc start="^\s*\\" end="$"
syn match hamlPreProc " |$"
syn match hamlComment "^!!!.*$"
syn match hamlComment "^\s*/.*$" contains=hamlTodo,@Spell
syn keyword hamlTodo TODO FIXME XXX contained
" special characters
syn match hamlSpecialChar contained "&#\=[0-9A-Za-z]\{1,8};"
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_haml_syntax_inits")
if version < 508
let did_haml_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink hamlLineClass hamlLineTag
HiLink hamlLineId hamlLineTag
HiLink hamlCssClassIncluded hamlCssClass
HiLink hamlCssIdIncluded Type
HiLink hamlCssId Type
HiLink hamlHtmlTagEnd hamlHtmlTag
HiLink hamlPreDef hamlHtmlTag
HiLink hamlRubyHash hamlLineTag
HiLink hamlRubyCode hamlLineTag
HiLink hamlRubyCodeIncluded hamlLineTag
HiLink hamlRubyString hamlLineTag
HiLink hamlRubyStringIncluded hamlLineTag
HiLink hamlLineTag Text
HiLink hamlHtmlTag Statement
HiLink hamlCssClass Type
HiLink hamlPreProc PreProc
HiLink hamlComment Comment
HiLink hamlTodo Todo
HiLink hamlSpecialChar Special
delcommand HiLink
endif
let b:current_syntax = "haml"
if main_syntax == 'haml'
unlet main_syntax
endif
" vim: nowrap sw=2 sts=2 ts=8 ff=unix:

149
.vim/syntax/jflex.vim Normal file
View file

@ -0,0 +1,149 @@
" Vim syntax file
" Language: JFlex
" Maintainer: Gerwin Klein <lsf@jflex.de>
" Last Change: $Revision: 50 $, $Date: 2003-06-08 21:01:12 +1000 (Sun, 08 Jun 2003) $
" Thanks to Michael Brailsford for help and suggestions
" Quit when a syntax file was already loaded {{{
if exists("b:current_syntax")
finish
endif
"}}}
" Include java syntax {{{
if version >= 600
runtime! syntax/java.vim
unlet b:current_syntax
else
so $VIMRUNTIME/syntax/java.vim
endif
"}}}
syn cluster jflexOptions contains=jflexOption,jflexCodeInclude,jflexComment,jflexMacroIdent,jflexMacroRegExp,jflexOptionError
syn cluster jflexRules contains=jflexRule,jflexComment,jflexActionCode,jflexRuleStates,jflexRegExp
" java code section
syn region jflexStart start="/\*\|//\|import\|package\|class"me=s end="^%%"me=e-2 contains=@javaTop nextgroup=jflexOptionReg
" %%
" options
syn region jflexOptionReg matchgroup=jflexSectionSep start="^%%" end="^%%"me=e-2 contains=@jflexOptions nextgroup=jflexRulesReg
syn match jflexOptionError "%\i*" contained
syn match jflexOption "^\(%s\|%x\)" contained
syn match jflexOption "^%state" contained
syn match jflexOption "^%states" contained
syn match jflexOption "^%xstate" contained
syn match jflexOption "^%xstates" contained
syn match jflexOption "^%char" contained
syn match jflexOption "^%line" contained
syn match jflexOption "^%column" contained
syn match jflexOption "^%byaccj" contained
syn match jflexOption "^%cup" contained
syn match jflexOption "^%cupsym" contained
syn match jflexOption "^%cupdebug" contained
syn match jflexOption "^%eofclose" contained
syn match jflexOption "^%class" contained
syn match jflexOption "^%function" contained
syn match jflexOption "^%type" contained
syn match jflexOption "^%integer" contained
syn match jflexOption "^%int" contained
syn match jflexOption "^%intwrap" contained
syn match jflexOption "^%yyeof" contained
syn match jflexOption "^%notunix" contained
syn match jflexOption "^%7bit" contained
syn match jflexOption "^%8bit" contained
syn match jflexOption "^%full" contained
syn match jflexOption "^%16bit" contained
syn match jflexOption "^%unicode" contained
syn match jflexOption "^%caseless" contained
syn match jflexOption "^%ignorecase" contained
syn match jflexOption "^%implements" contained
syn match jflexOption "^%extends" contained
syn match jflexOption "^%public" contained
syn match jflexOption "^%apiprivate" contained
syn match jflexOption "^%final" contained
syn match jflexOption "^%abstract" contained
syn match jflexOption "^%debug" contained
syn match jflexOption "^%standalone" contained
syn match jflexOption "^%switch" contained
syn match jflexOption "^%table" contained
syn match jflexOption "^%pack" contained
syn match jflexOption "^%include" contained
syn match jflexOption "^%buffer" contained
syn match jflexOption "^%initthrow" contained
syn match jflexOption "^%eofthrow" contained
syn match jflexOption "^%yylexthrow" contained
syn match jflexOption "^%throws" contained
syn match jflexOption "^%scannerror" contained
syn match jflexMacroIdent "\I\i*\s*="me=e-1 contained nextgroup=jflexMacroRegExp
syn region jflexMacroRegExp matchgroup=jflexOperator start="=" end="^\(%\|\I\|\i\|/\)"me=e-1 contains=NONE contained
syn region jflexCodeInclude matchgroup=jflexCodeIncludeMark start="^%{" end="^%}" contains=@javaTop contained
syn region jflexCodeInclude matchgroup=jflexCodeIncludeMark start="^%init{" end="^%init}" contains=@javaTop contained
syn region jflexCodeInclude matchgroup=jflexCodeIncludeMark start="^%initthrow{" end="^%initthrow}" contains=@javaTop contained
syn region jflexCodeInclude matchgroup=jflexCodeIncludeMark start="^%eof{" end="^%eof}" contains=@javaTop contained
syn region jflexCodeInclude matchgroup=jflexCodeIncludeMark start="^%eofthrow{" end="^%eofthrow}" contains=@javaTop contained
syn region jflexCodeInclude matchgroup=jflexCodeIncludeMark start="^%yylexthrow{" end="^%yylexthrow}" contains=@javaTop contained
syn region jflexCodeInclude matchgroup=jflexCodeIncludeMark start="^%eofval{" end="^%eofval}" contains=@javaTop contained
" rules (end pattern shouldn't occur, if it does anyway we just stay in jflexRulesReg)
syn region jflexRulesReg matchgroup=jflexSectionSep start="^%%" end="^%%"me=e-2 contains=@jflexRules
" at first everything but strings is a regexp
syn match jflexRegExp "\([^\" \t]\|\\\"\)\+" contained
" take out comments
syn match jflexComment "//.*" contained
syn region jflexComment start="/\*" end="\*/" contained contains=jflexComment
" lex states
syn match jflexRuleStates "<\s*\I\i*\(\s*,\s*\I\i*\)*\s*>" contained skipnl skipwhite nextgroup=jflexStateGroup
" action code (only after states braces and macro use)
syn region jflexActionCode matchgroup=Delimiter start="{" end="}" contained contains=@javaTop,jflexJavaBraces
" macro use
syn match jflexRegExp "{\s*\I\i*\s*}" contained
" state braces (only active after <state>)
syn region jflexStateGroup matchgroup=jflexRuleStates start="{$" start="{\s" end="}" contained contains=@jflexRules
" string
syn region jflexRegExp matchgroup=String start=+"+ skip=+\\\\\|\\"+ end=+"+ contained
" not to be confused with a state
syn match jflexRegExp "<<EOF>>" contained
" escape sequence
syn match jflexRegExp "\\." contained
" keep braces in actions balanced
syn region jflexJavaBraces start="{" end="}" contained contains=@javaTop,jflexJavaBraces
" syncing
syn sync clear
syn sync minlines=10
syn sync match jflexSync grouphere jflexOptionReg "^%[a-z]"
syn sync match jflexSync grouphere jflexRulesReg "^<"
" highlighting
hi link jflexOption Special
hi link jflexMacroIdent Ident
hi link jflexMacroRegExp Macro
hi link jflexOptionError Error
hi link jflexComment Comment
hi link jflexOperator Operator
hi link jflexRuleStates Special
hi link jflexRegExp Function
hi jflexSectionSep guifg=yellow ctermfg=yellow guibg=blue ctermbg=blue gui=bold cterm=bold
hi link jflexCodeIncludeMark jflexSectionSep
let b:current_syntax="jflex"

74
.vim/syntax/kpl.vim Normal file
View file

@ -0,0 +1,74 @@
" Vim syntax file
" Language: KPL
" Maintainer: Adam Blinkinsop <blinks@acm.org>
" Last Change: 2007 Apr 17
" Remark: A Kernel Programming Language used by the BLITZ tools.
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
" Comments
syntax region kplSingleLineComment start=/--/ end=/$/ contained
syntax region kplMultiLineComment start=/\/\*/ end=/\*\// contained
syntax cluster kplComment contains=kplSingleLineComment,kplMultiLineComment
" Types
syntax keyword kplType char int double bool void typeOfNull anyType ptr to array of function returns
syntax region kplRecord matchgroup=kplType start=/record/ end=/endRecord/ contains=ALL
" Expressions
syntax keyword kplOperator asPtrTo asInteger arraySize isInstanceOf isKindOf new alloc sizeOf
syntax match kplOp /[][.()<=>|&^!+*/%]/ contained
syntax keyword kplConstant null self super
syntax keyword kplBoolean true false
syntax match kplCharacter /'\\?.'/
syntax match kplInteger /[0-9]+/
syntax match kplHex /0x[0-9a-fA-F]+/
syntax match kplFloat /[0-9]+\.[0-9]+(e[0-9]+)?/
syntax region kplString start=/"/ end=/"/ skip=/\\"/
" Statements
syntax keyword kplConditional if elseIf else endIf switch endSwitch
syntax keyword kplRepeat while endWhile do until for endFor
syntax keyword kplStatement break continue free debug
syntax keyword kplLabel case default
syntax keyword kplException try catch throw endTry
" Block Definitions
syntax keyword kplKeyword extends messages implements superclass fields uses renaming to const var errors type enum returns function[s] external endFunction infix prefix method[s] endMethod
syntax region kplInterface matchgroup=kplDefBlock start=/interface/ end=/endInterface/ contains=ALL
syntax region kplClass matchgroup=kplDefBlock start=/class/ end=/endClass/ contains=ALL
syntax region kplBehavior matchgroup=kplDefBlock start=/behavior/ end=/endBehavior/ contains=ALL
" File Blocks
syntax region kplHeader matchgroup=kplFile start=/header/ end=/endHeader/ contains=ALLBUT,kplHeader,kplCode
syntax region kplCode matchgroup=kplFile start=/code/ end=/endCode/ contains=ALLBUT,kplHeader,kplCode
syntax sync match kplCode grouphere kplCode 'code'
syntax sync match kplCode groupthere kplCode 'endCode'
syntax sync match kplHeader grouphere kplHeader 'region'
syntax sync match kplHeader groupthere kplHeader 'endRegion'
hi def link kplSingleLineComment Comment
hi def link kplMultiLineComment Comment
hi def link kplType Type
hi def link kplOperator Operator
hi def link kplOp Operator
hi def link kplConstant Constant
hi def link kplBoolean Boolean
hi def link kplString String
hi def link kplCharacter Character
hi def link kplInteger Number
hi def link kplHex Number
hi def link kplFloat Float
hi def link kplConditional Conditional
hi def link kplRepeat Repeat
hi def link kplStatement Statement
hi def link kplLabel Label
hi def link kplException Exception
hi def link kplKeyword Keyword
hi def link kplFile Special
hi def link kplDefBlock Structure

144
.vim/syntax/lhaskell.vim Normal file
View file

@ -0,0 +1,144 @@
" Vim syntax file
" Language: Haskell with literate comments, Bird style,
" TeX style and plain text surrounding
" \begin{code} \end{code} blocks
" Maintainer: Haskell Cafe mailinglist <haskell-cafe@haskell.org>
" Original Author: Arthur van Leeuwen <arthurvl@cs.uu.nl>
" Last Change: Jan 05, 2008 by Kalman Noel
" Version: 1.02
"
" Thanks to Ian Lynagh for thoughtful comments on initial versions and
" for the inspiration for writing this in the first place.
"
" This style guesses as to the type of markup used in a literate haskell
" file and will highlight (La)TeX markup if it finds any
" This behaviour can be overridden, both glabally and locally using
" the lhs_markup variable or b:lhs_markup variable respectively.
"
" lhs_markup must be set to either tex or none to indicate that
" you always want (La)TeX highlighting or no highlighting
" must not be set to let the highlighting be guessed
" b:lhs_markup must be set to eiterh tex or none to indicate that
" you want (La)TeX highlighting or no highlighting for
" this particular buffer
" must not be set to let the highlighting be guessed
"
"
" 2004 February 18: New version, based on Ian Lynagh's TeX guessing
" lhaskell.vim, cweb.vim, tex.vim, sh.vim and fortran.vim
" 2004 February 20: Cleaned up the guessing and overriding a bit
" 2004 February 23: Cleaned up syntax highlighting for \begin{code} and
" \end{code}, added some clarification to the attributions
" 2008 January 05: Fixed broken highlighting when some totally common TeX
" environments or commands are used (document, section, ...)
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
" First off, see if we can inherit a user preference for lhs_markup
if !exists("b:lhs_markup")
if exists("lhs_markup")
if lhs_markup =~ '\<\%(tex\|none\)\>'
let b:lhs_markup = matchstr(lhs_markup,'\<\%(tex\|none\)\>')
else
echohl WarningMsg | echo "Unknown value of lhs_markup" | echohl None
let b:lhs_markup = "unknown"
endif
else
let b:lhs_markup = "unknown"
endif
else
if b:lhs_markup !~ '\<\%(tex\|none\)\>'
let b:lhs_markup = "unknown"
endif
endif
" Remember where the cursor is, and go to upperleft
let s:oldline=line(".")
let s:oldcolumn=col(".")
call cursor(1,1)
" If no user preference, scan buffer for our guess of the markup to
" highlight. We only differentiate between TeX and plain markup, where
" plain is not highlighted. The heuristic for finding TeX markup is if
" one of the following occurs anywhere in the file:
" - \documentclass
" - \begin{env} (for env != code)
" - \part, \chapter, \section, \subsection, \subsubsection, etc
if b:lhs_markup == "unknown"
if search('%\|\\documentclass\|\\begin{\(code}\)\@!\|\\\(sub\)*section\|\\chapter|\\part','W') != 0
let b:lhs_markup = "tex"
else
let b:lhs_markup = "plain"
endif
endif
" If user wants us to highlight TeX syntax, read it.
if b:lhs_markup == "tex"
if version < 600
source <sfile>:p:h/tex.vim
set isk+=_
else
runtime! syntax/tex.vim
unlet b:current_syntax
" Tex.vim removes "_" from 'iskeyword', but we need it for Haskell.
setlocal isk+=_
endif
endif
" Literate Haskell is Haskell in between text, so at least read Haskell
" highlighting
if version < 600
syntax include @haskellTop <sfile>:p:h/haskell.vim
else
syntax include @haskellTop syntax/haskell.vim
endif
" Where Haskell is nested within TeX
syntax cluster lhstex contains=tex.*Zone,texAbstract
syntax region lhsHaskellBirdTrack start="^>" end="\%(^[^>]\)\@=" contains=@haskellTop,lhsBirdTrack containedIn=@lhstex
syntax region lhsHaskellBeginEndBlock start="^\\begin{code}\s*$" matchgroup=NONE end="\%(^\\end{code}.*$\)\@=" contains=@haskellTop,@beginCode containedIn=@lhstex
syntax match lhsBirdTrack "^>" contained
syntax match beginCodeBegin "^\\begin" nextgroup=beginCodeCode contained
syntax region beginCodeCode matchgroup=texDelimiter start="{" end="}"
syntax cluster beginCode contains=beginCodeBegin,beginCodeCode
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_tex_syntax_inits")
if version < 508
let did_tex_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink lhsBirdTrack Comment
HiLink beginCodeBegin texCmdName
HiLink beginCodeCode texSection
delcommand HiLink
endif
" Restore cursor to original position, as it may have been disturbed
" by the searches in our guessing code
call cursor (s:oldline, s:oldcolumn)
unlet s:oldline
unlet s:oldcolumn
let b:current_syntax = "lhaskell"
" vim: ts=8

86
.vim/syntax/puppet.vim Normal file
View file

@ -0,0 +1,86 @@
" puppet syntax file
" Filename: puppet.vim
" Language: puppet configuration file
" Maintainer: Luke Kanies <luke@madstop.com>
" URL:
" Last Change:
" Version:
"
" Copied from the cfengine, ruby, and perl syntax files
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
syn region puppetDefine start="^\s*\(class\|define\|site\|node\)" end="{" contains=puppetDefType,puppetDefName,puppetDefArguments
syn keyword puppetDefType class define site node inherits contained
syn keyword puppetInherits inherits contained
syn region puppetDefArguments start="(" end=")" contains=puppetArgument
syn match puppetArgument "\w\+" contained
syn match puppetDefName "\w\+" contained
syn match puppetInstance "\w\+\s*{" contains=puppetTypeBrace,puppetTypeName,puppetTypeDefault
syn match puppetTypeBrace "{" contained
syn match puppetTypeName "[a-z]\w*" contained
syn match puppetTypeDefault "[A-Z]\w*" contained
syn match puppetParam "\w\+\s*=>" contains=puppetTypeRArrow,puppetParamName
syn match puppetParamRArrow "=>" contained
syn match puppetParamName "\w\+" contained
syn match puppetVariable "$\w\+"
syn match puppetVariable "${\w\+}"
syn match puppetParen "("
syn match puppetParen ")"
syn match puppetBrace "{"
syn match puppetBrace "}"
syn region puppetString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=puppetVariable
syn keyword puppetBoolean true false
syn keyword puppetKeyword import inherits include
syn keyword puppetControl case default
" comments last overriding everything else
syn match puppetComment "\s*#.*$" contains=puppetTodo
syn keyword puppetTodo TODO NOTE FIXME XXX contained
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_puppet_syn_inits")
if version < 508
let did_puppet_syn_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink puppetVariable Identifier
HiLink puppetBoolean Boolean
HiLink puppetType Identifier
HiLink puppetDefault Identifier
HiLink puppetKeyword Define
HiLink puppetTypeDefs Define
HiLink puppetComment Comment
HiLink puppetString String
HiLink puppetTodo Todo
" HiLink puppetBrace Delimiter
" HiLink puppetTypeBrace Delimiter
" HiLink puppetParen Delimiter
HiLink puppetDelimiter Delimiter
HiLink puppetControl Statement
HiLink puppetDefType Define
HiLink puppetDefName Type
HiLink puppetTypeName Statement
HiLink puppetTypeDefault Type
HiLink puppetParamName Identifier
HiLink puppetArgument Identifier
delcommand HiLink
endif
let b:current_syntax = "puppet"

11
.vim/syntax/rht.bak Normal file
View file

@ -0,0 +1,11 @@
" load all of the HTML info
"source $VIMRUNTIME/syntax/html.vim
runtime! syntax/html.vim
unlet b:current_syntax
" load all of the ruby info into @Ruby
syntax include @Ruby $VIMRUNTIME/syntax/ruby.vim
unlet b:current_syntax
syntax region rhtmlRuby start="<%" end="%" contains=@Ruby,rhtmlRuby
let b:current_syntax = "rhtml"

25
.vim/syntax/rhtml.vim Normal file
View file

@ -0,0 +1,25 @@
" HTML with embedded Ruby
" Language: HTML + Ruby
" Maintainer: Tobias DiPasquale <anany / ece.villanova.edu>
" Last Modified: 2002 Mar 07
" Location: http://cbcg.net/rhtml.vim
" for portability
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
" load all of the HTML info
source $VIMRUNTIME/syntax/html.vim
unlet b:current_syntax
" load all of the ruby info into @Ruby
syntax include @Ruby $VIMRUNTIME/syntax/ruby.vim
syntax region rhtmlRuby
\ start=/<%/
\ end=/%>/
\ contains=@Ruby, rhtmlRuby
let b:current_syntax = "rhtml"

View file

@ -0,0 +1,6 @@
" load all of the HTML info
source $VIMRUNTIME/syntax/html.vim
unlet b:current_syntax
syntax include @Ruby runtime! syntax/ruby.vim
syntax region rhtmlRuby start=+<%+ end=+%>+ contains=@Ruby,rhtmlRuby
let b:current_syntax="rhtml"