home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / mac / vim55rt.sit / runtime / syntax / vim.vim < prev    next >
Encoding:
Text File  |  1999-09-25  |  39.7 KB  |  690 lines  |  [TEXT/VIM!]

  1. " Vim syntax file
  2. " Language:    Vim 5.5b script
  3. " Maintainer:    Dr. Charles E. Campbell, Jr. <cec@gryphon.gsfc.nasa.gov>
  4. " Last Change:    September 13, 1999
  5. " Version:    5.5b-01
  6.  
  7. " Remove old syntax
  8. syn clear
  9.  
  10. syn keyword vimTodo contained    COMBAK    NOT    RELEASED    TODO
  11.  
  12. " regular vim commands
  13. syn keyword vimCommand contained    N[ext]    comc[lear]    inoremenu    pe[rl]    star[tinsert]
  14. syn keyword vimCommand contained    P[rint]    con[tinue]    is[earch]    perld[o]    stj[ump]
  15. syn keyword vimCommand contained    X    conf[irm]    isp[lit]    po[p]    sts[elect]
  16. syn keyword vimCommand contained    a[ppend]    cp[revious]    iu[nmap]    pp[op]    sun[hide]
  17. syn keyword vimCommand contained    ab[breviate]    cq[uit]    iuna[bbrev]    pre[serve]    sus[pend]
  18. syn keyword vimCommand contained    abc[lear]    cr[ewind]    iunme    prev[ious]    sv[iew]
  19. syn keyword vimCommand contained    al[l]    cu[nmap]    iunmenu    promptf[ind]    sy[ntax]
  20. syn keyword vimCommand contained    am    cuna[bbrev]    j[oin]    promptr[epl]    syncbind
  21. syn keyword vimCommand contained    amenu    cunme    ju[mps]    ptN[ext]    syntax
  22. syn keyword vimCommand contained    an    cunmenu    k    pta[g]    t
  23. syn keyword vimCommand contained    anoremenu    d[elete]    l[ist]    ptj[ump]    tN[ext]
  24. syn keyword vimCommand contained    ar[gs]    delc[ommand]    la[st]    ptl[ast]    ta[g]
  25. syn keyword vimCommand contained    argu[ment]    delf[unction]    le[ft]    ptn[ext]    tags
  26. syn keyword vimCommand contained    as[cii]    di[splay]    let    ptp[revious]    tc[l]
  27. syn keyword vimCommand contained    au[tocmd]    dig[raphs]    ls    ptr[ewind]    tcld[o]
  28. syn keyword vimCommand contained    aug[roup]    display    m[ove]    pts[elect]    tclf[ile]
  29. syn keyword vimCommand contained    aun    dj[ump]    ma[rk]    pu[t]    te[aroff]
  30. syn keyword vimCommand contained    aunmenu    dl[ist]    mak[e]    pw[d]    tj[ump]
  31. syn keyword vimCommand contained    autocmd    do[autocmd]    map    py[thon]    tl[ast]
  32. syn keyword vimCommand contained    bN[ext]    doautoa[ll]    mapc[lear]    pyf[ile]    tm[enu]
  33. syn keyword vimCommand contained    b[uffer]    ds[earch]    marks    q[uit]    tn[ext]
  34. syn keyword vimCommand contained    ba[ll]    dsp[lit]    me    qa[ll]    tp[revious]
  35. syn keyword vimCommand contained    bad[d]    e[dit]    menu    r[ead]    tr[ewind]
  36. syn keyword vimCommand contained    bd[elete]    ec[ho]    mk[exrc]    rec[over]    ts[elect]
  37. syn keyword vimCommand contained    be[have]    echoh[l]    mks[ession]    red[o]    tu[nmenu]
  38. syn keyword vimCommand contained    bl[ast]    echon    mkv[imrc]    redi[r]    u[ndo]
  39. syn keyword vimCommand contained    bm[odified]    el[se]    mod[e]    reg[isters]    una[bbreviate]
  40. syn keyword vimCommand contained    bn[ext]    elsei[f]    n[ext]    res[ize]    unh[ide]
  41. syn keyword vimCommand contained    bp[revious]    eme    new    ret[ab]    unl[et]
  42. syn keyword vimCommand contained    br[ewind]    emenu    nm[ap]    retu[rn]    unm[ap]
  43. syn keyword vimCommand contained    brea[k]    en[dif]    nmapc[lear]    rew[ind]    unme
  44. syn keyword vimCommand contained    bro[wse]    endf[unction]    nme    ri[ght]    unmenu
  45. syn keyword vimCommand contained    buffers    endw[hile]    nmenu    rv[iminfo]    v[global]
  46. syn keyword vimCommand contained    bun[load]    ex    nn[oremap]    sN[ext]    ve[rsion]
  47. syn keyword vimCommand contained    cN[ext]    exe[cute]    nnoreme    s[ubstitute]    vi[sual]
  48. syn keyword vimCommand contained    c[hange]    exi[t]    nnoremenu    sa[rgument]    vie[w]
  49. syn keyword vimCommand contained    ca[bbrev]    f[ile]    no[remap]    sal[l]    vm[ap]
  50. syn keyword vimCommand contained    cabc[lear]    files    noh[lsearch]    sbN[ext]    vmapc[lear]
  51. syn keyword vimCommand contained    cal[l]    fin[d]    norea[bbrev]    sb[uffer]    vme
  52. syn keyword vimCommand contained    cc    fix[del]    noreme    sba[ll]    vmenu
  53. syn keyword vimCommand contained    cd    fu[nction]    noremenu    sbl[ast]    vn[oremap]
  54. syn keyword vimCommand contained    ce[nter]    g[lobal]    norm[al]    sbm[odified]    vnoreme
  55. syn keyword vimCommand contained    cf[ile]    go[to]    nu[mber]    sbn[ext]    vnoremenu
  56. syn keyword vimCommand contained    chd[ir]    gr[ep]    nun[map]    sbp[revious]    vu[nmap]
  57. syn keyword vimCommand contained    che[ckpath]    h[elp]    nunme    sbr[ewind]    vunme
  58. syn keyword vimCommand contained    cl[ist]    helpf[ind]    nunmenu    se[t]    vunmenu
  59. syn keyword vimCommand contained    cla[st]    hi[ghlight]    o[pen]    sf[ind]    wN[ext]
  60. syn keyword vimCommand contained    clo[se]    hid[e]    om[ap]    sh[ell]    w[rite]
  61. syn keyword vimCommand contained    cm[ap]    his[tory]    omapc[lear]    si[malt]    wa[ll]
  62. syn keyword vimCommand contained    cmapc[lear]    i[nsert]    ome    sl[eep]    wh[ile]
  63. syn keyword vimCommand contained    cme    ia[bbrev]    omenu    sla[st]    win[size]
  64. syn keyword vimCommand contained    cmenu    iabc[lear]    on[ly]    sm[agic]    winp[os]
  65. syn keyword vimCommand contained    cn[ext]    if    ono[remap]    sn[ext]    winsize
  66. syn keyword vimCommand contained    cnew[er]    ij[ump]    onoreme    sni[ff]    wn[ext]
  67. syn keyword vimCommand contained    cnf[ile]    il[ist]    onoremenu    sno[magic]    wp[revous]
  68. syn keyword vimCommand contained    cno[remap]    im[ap]    opt[ions]    so[urce]    wq
  69. syn keyword vimCommand contained    cnorea[bbrev]    imapc[lear]    ou[nmap]    sp[lit]    wqa[ll]
  70. syn keyword vimCommand contained    cnoreme    ime    ounme    spr[evious]    wv[iminfo]
  71. syn keyword vimCommand contained    cnoremenu    imenu    ounmenu    sr[ewind]    x[it]
  72. syn keyword vimCommand contained    co[py]    ino[remap]    p[rint]    st[op]    xa[ll]
  73. syn keyword vimCommand contained    col[der]    inorea[bbrev]    pc[lose]    sta[g]    y[ank]
  74. syn keyword vimCommand contained    com[mand]    inoreme
  75. syn match   vimCommand contained    "z[-+^.=]"
  76.  
  77. " All vimCommands are contained by vimIsCommands.
  78. syn match vimIsCommand    "[:|]\s*[a-zA-Z]\+"    transparent contains=vimCommand
  79. syn match vimIsCommand    "^[ \t:]*[a-zA-Z]\+"    transparent contains=vimCommand
  80.  
  81. " vimOptions are caught only when contained in a vimSet
  82. syn keyword vimOption contained    ai    equalalways    km    scb    tagstack
  83. syn keyword vimOption contained    akm    equalprg    kp    scr    tb
  84. syn keyword vimOption contained    al    errorbells    langmap    scroll    tbi
  85. syn keyword vimOption contained    aleph    errorfile    laststatus    scrollbind    tbs
  86. syn keyword vimOption contained    allowrevins    errorformat    lazyredraw    scrolljump    term
  87. syn keyword vimOption contained    altkeymap    esckeys    lbr    scrolloff    terse
  88. syn keyword vimOption contained    ari    et    lcs    scrollopt    textauto
  89. syn keyword vimOption contained    autoindent    eventignore    linebreak    scs    textmode
  90. syn keyword vimOption contained    autowrite    ex    lines    sect    textwidth
  91. syn keyword vimOption contained    aw    expandtab    lisp    sections    tf
  92. syn keyword vimOption contained    background    exrc    list    secure    tgst
  93. syn keyword vimOption contained    backspace    fe    listchars    sel    tildeop
  94. syn keyword vimOption contained    backup    ff    lmap    selection    timeout
  95. syn keyword vimOption contained    backupdir    ffs    ls    selectmode    timeoutlen
  96. syn keyword vimOption contained    backupext    fileencoding    lz    sessionoptions    title
  97. syn keyword vimOption contained    bdir    fileformat    magic    sft    titlelen
  98. syn keyword vimOption contained    bex    fileformats    makeef    sh    titleold
  99. syn keyword vimOption contained    bg    filetype    makeprg    shcf    titlestring
  100. syn keyword vimOption contained    bin    fk    mat    shell    tl
  101. syn keyword vimOption contained    binary    fkmap    matchpairs    shellcmdflag    tm
  102. syn keyword vimOption contained    biosk    fo    matchtime    shellpipe    to
  103. syn keyword vimOption contained    bioskey    formatoptions    maxfuncdepth    shellquote    toolbar
  104. syn keyword vimOption contained    bk    formatprg    maxmapdepth    shellredir    top
  105. syn keyword vimOption contained    breakat    fp    maxmem    shellslash    tr
  106. syn keyword vimOption contained    brk    ft    maxmemtot    shelltype    ts
  107. syn keyword vimOption contained    browsedir    gcr    mef    shellxquote    tsl
  108. syn keyword vimOption contained    bs    gd    mfd    shiftround    ttimeout
  109. syn keyword vimOption contained    bsdir    gdefault    mh    shiftwidth    ttimeoutlen
  110. syn keyword vimOption contained    cb    gfm    ml    shm    ttm
  111. syn keyword vimOption contained    cf    gfn    mls    shortmess    ttybuiltin
  112. syn keyword vimOption contained    ch    gfs    mm    shortname    ttyfast
  113. syn keyword vimOption contained    cin    ghr    mmd    showbreak    ttym
  114. syn keyword vimOption contained    cindent    go    mmt    showcmd    ttymouse
  115. syn keyword vimOption contained    cink    gp    mod    showfulltag    ttyscroll
  116. syn keyword vimOption contained    cinkeys    grepformat    modeline    showmatch    ttytype
  117. syn keyword vimOption contained    cino    grepprg    modelines    showmode    tw
  118. syn keyword vimOption contained    cinoptions    guicursor    modified    shq    tx
  119. syn keyword vimOption contained    cinw    guifont    more    si    uc
  120. syn keyword vimOption contained    cinwords    guifontset    mouse    sidescroll    ul
  121. syn keyword vimOption contained    clipboard    guiheadroom    mousef    sj    undolevels
  122. syn keyword vimOption contained    cmdheight    guioptions    mousefocus    slm    updatecount
  123. syn keyword vimOption contained    co    guipty    mousehide    sm    updatetime
  124. syn keyword vimOption contained    columns    helpfile    mousem    smartcase    ut
  125. syn keyword vimOption contained    com    helpheight    mousemodel    smartindent    vb
  126. syn keyword vimOption contained    comments    hf    mouset    smarttab    vbs
  127. syn keyword vimOption contained    compatible    hh    mousetime    smd    verbose
  128. syn keyword vimOption contained    complete    hi    mp    sn    vi
  129. syn keyword vimOption contained    confirm    hid    mps    so    viminfo
  130. syn keyword vimOption contained    consk    hidden    nf    softtabstop    visualbell
  131. syn keyword vimOption contained    conskey    highlight    nrformats    sol    wa
  132. syn keyword vimOption contained    cp    history    nu    sp    wak
  133. syn keyword vimOption contained    cpo    hk    number    splitbelow    warn
  134. syn keyword vimOption contained    cpoptions    hkmap    oft    sr    wb
  135. syn keyword vimOption contained    cpt    hkmapp    osfiletype    srr    wc
  136. syn keyword vimOption contained    cscopeprg    hkp    pa    ss    wcm
  137. syn keyword vimOption contained    cscopetag    hl    para    ssl    wd
  138. syn keyword vimOption contained    cscopetagorder    hls    paragraphs    ssop    weirdinvert
  139. syn keyword vimOption contained    cscopeverbose    hlsearch    paste    st    wh
  140. syn keyword vimOption contained    csprg    ic    pastetoggle    sta    whichwrap
  141. syn keyword vimOption contained    cst    icon    patchmode    startofline    wig
  142. syn keyword vimOption contained    csto    iconstring    path    statusline    wildchar
  143. syn keyword vimOption contained    csverb    ignorecase    pm    stl    wildcharm
  144. syn keyword vimOption contained    def    im    previewheight    sts    wildignore
  145. syn keyword vimOption contained    define    inc    pt    su    wildmenu
  146. syn keyword vimOption contained    dg    include    pvh    suffixes    wildmode
  147. syn keyword vimOption contained    dict    incsearch    readonly    sw    wim
  148. syn keyword vimOption contained    dictionary    inf    remap    swapfile    winaltkeys
  149. syn keyword vimOption contained    digraph    infercase    report    swapsync    winheight
  150. syn keyword vimOption contained    dir    insertmode    restorescreen    swb    winminheight
  151. syn keyword vimOption contained    directory    is    revins    swf    wiv
  152. syn keyword vimOption contained    display    isf    ri    switchbuf    wm
  153. syn keyword vimOption contained    dy    isfname    rightleft    sws    wmh
  154. syn keyword vimOption contained    ea    isi    rl    sxq    wmnu
  155. syn keyword vimOption contained    eb    isident    ro    syn    wrap
  156. syn keyword vimOption contained    ed    isk    rs    syntax    wrapmargin
  157. syn keyword vimOption contained    edcompatible    iskeyword    ru    ta    wrapscan
  158. syn keyword vimOption contained    ef    isp    ruf    tabstop    write
  159. syn keyword vimOption contained    efm    isprint    ruler    tag    writeany
  160. syn keyword vimOption contained    ei    joinspaces    rulerformat    tagbsearch    writebackup
  161. syn keyword vimOption contained    ek    js    sb    taglength    writedelay
  162. syn keyword vimOption contained    endofline    key    sbo    tagrelative    ws
  163. syn keyword vimOption contained    eol    keymodel    sbr    tags    ww
  164. syn keyword vimOption contained    ep    keywordprg    sc
  165.  
  166. " These are the turn-off setting variants
  167. syn keyword vimOption contained    noai    noedcompatible    noinsertmode    nors    notagstack
  168. syn keyword vimOption contained    noakm    noek    nois    noru    notbi
  169. syn keyword vimOption contained    noallowrevins    noendofline    nojoinspaces    noruler    notbs
  170. syn keyword vimOption contained    noaltkeymap    noeol    nojs    nosb    noterse
  171. syn keyword vimOption contained    noari    noequalalways    nolazyredraw    nosc    notextauto
  172. syn keyword vimOption contained    noautoindent    noerrorbells    nolbr    noscs    notextmode
  173. syn keyword vimOption contained    noautowrite    noesckeys    nolinebreak    nosecure    notf
  174. syn keyword vimOption contained    noaw    noet    nolisp    noshellslash    notgst
  175. syn keyword vimOption contained    nobackup    noex    nolist    noshiftround    notildeop
  176. syn keyword vimOption contained    nobin    noexpandtab    nolz    noshortname    notimeout
  177. syn keyword vimOption contained    nobinary    noexrc    nomagic    noshowcmd    notitle
  178. syn keyword vimOption contained    nobiosk    nofk    nomh    noshowmatch    noto
  179. syn keyword vimOption contained    nobioskey    nofkmap    noml    noshowmode    notop
  180. syn keyword vimOption contained    nobk    nogd    nomod    nosi    notr
  181. syn keyword vimOption contained    nocf    nogdefault    nomodeline    nosm    nottimeout
  182. syn keyword vimOption contained    nocin    noguipty    nomodified    nosmartcase    nottybuiltin
  183. syn keyword vimOption contained    nocindent    nohid    nomore    nosmartindent    nottyfast
  184. syn keyword vimOption contained    nocompatible    nohidden    nomousef    nosmarttab    notx
  185. syn keyword vimOption contained    noconfirm    nohk    nomousefocus    nosmd    novb
  186. syn keyword vimOption contained    noconsk    nohkmap    nomousehide    nosn    novisualbell
  187. syn keyword vimOption contained    noconskey    nohkmapp    nonu    nosol    nowa
  188. syn keyword vimOption contained    nocp    nohkp    nonumber    nosplitbelow    nowarn
  189. syn keyword vimOption contained    nocscopetag    nohls    nopaste    nosr    nowb
  190. syn keyword vimOption contained    nocscopeverbose    nohlsearch    noreadonly    nossl    noweirdinvert
  191. syn keyword vimOption contained    nocst    noic    noremap    nosta    nowiv
  192. syn keyword vimOption contained    nocsverb    noicon    norestorescreen    nostartofline    nowrap
  193. syn keyword vimOption contained    nodg    noignorecase    norevins    noswapfile    nowrapscan
  194. syn keyword vimOption contained    nodigraph    noim    nori    noswf    nowrite
  195. syn keyword vimOption contained    noea    noincsearch    norightleft    nota    nowriteany
  196. syn keyword vimOption contained    noeb    noinf    norl    notagbsearch    nowritebackup
  197. syn keyword vimOption contained    noed    noinfercase    noro    notagrelative    nows
  198.  
  199. " termcap codes (which can also be set)
  200. syn keyword vimOption contained    t_AB    t_IE    t_WS    t_k1    t_kd    t_op
  201. syn keyword vimOption contained    t_AF    t_IS    t_ZH    t_k2    t_ke    t_se
  202. syn keyword vimOption contained    t_AL    t_K1    t_ZR    t_k3    t_kh    t_so
  203. syn keyword vimOption contained    t_CS    t_K3    t_al    t_k4    t_kl    t_sr
  204. syn keyword vimOption contained    t_Co    t_K4    t_bc    t_k5    t_kr    t_te
  205. syn keyword vimOption contained    t_DL    t_K5    t_cd    t_k6    t_ks    t_ti
  206. syn keyword vimOption contained    t_F1    t_K6    t_ce    t_k7    t_ku    t_ts
  207. syn keyword vimOption contained    t_F2    t_K7    t_cl    t_k8    t_le    t_ue
  208. syn keyword vimOption contained    t_F3    t_K9    t_cm    t_k9    t_mb    t_us
  209. syn keyword vimOption contained    t_F4    t_KA    t_cs    t_kD    t_md    t_vb
  210. syn keyword vimOption contained    t_F5    t_RI    t_da    t_kI    t_me    t_ve
  211. syn keyword vimOption contained    t_F6    t_RV    t_db    t_kN    t_mr    t_vi
  212. syn keyword vimOption contained    t_F7    t_Sb    t_dl    t_kP    t_ms    t_vs
  213. syn keyword vimOption contained    t_F8    t_Sf    t_fs    t_kb    t_nd    t_xs
  214. syn keyword vimOption contained    t_F9    t_WP
  215. syn match   vimOption contained    "t_#4"
  216. syn match   vimOption contained    "t_%1"
  217. syn match   vimOption contained    "t_%i"
  218. syn match   vimOption contained    "t_&8"
  219. syn match   vimOption contained    "t_@7"
  220. syn match   vimOption contained    "t_k;"
  221.  
  222. " these settings don't actually cause errors in vim, but were supported by vi and don't do anything in vim
  223. syn keyword vimErrSetting contained    hardtabs    w1200    w9600    wi    window
  224. syn keyword vimErrSetting contained    ht    w300
  225.  
  226. " AutoBuf Events
  227. syn case ignore
  228. syn keyword vimAutoEvent contained    BufCreate    BufReadPost    FileAppendPre    FilterReadPre    Syntax
  229. syn keyword vimAutoEvent contained    BufDelete    BufReadPre    FileChangedShell    FilterWritePost    TermChanged
  230. syn keyword vimAutoEvent contained    BufEnter    BufUnload    FileReadPost    FilterWritePre    User
  231. syn keyword vimAutoEvent contained    BufFilePost    BufWrite    FileReadPre    FocusGained    VimEnter
  232. syn keyword vimAutoEvent contained    BufFilePre    BufWritePost    FileType    FocusLost    VimLeave
  233. syn keyword vimAutoEvent contained    BufHidden    BufWritePre    FileWritePost    GUIEnter    VimLeavePre
  234. syn keyword vimAutoEvent contained    BufLeave    CursorHold    FileWritePre    StdinReadPost    WinEnter
  235. syn keyword vimAutoEvent contained    BufNewFile    FileAppendPost    FilterReadPost    StdinReadPre    WinLeave
  236. syn keyword vimAutoEvent contained    BufRead
  237.  
  238. " Highlight commonly used Groupnames
  239. syn keyword vimGroup    Comment    Identifier    Keyword    Type    Delimiter
  240. syn keyword vimGroup    Constant    Function    Exception    StorageClass    SpecialComment
  241. syn keyword vimGroup    String    Statement    PreProc    Structure    Debug
  242. syn keyword vimGroup    Character    Conditional    Include    Typedef    Ignore
  243. syn keyword vimGroup    Number    Repeat    Define    Special    Error
  244. syn keyword vimGroup    Boolean    Label    Macro    SpecialChar    Todo
  245. syn keyword vimGroup    Float    Operator    PreCondit    Tag
  246.  
  247. " Default highlighting groups
  248. syn keyword vimHLGroup    Cursor    Menu    Normal    SpecialKey    Visual
  249. syn keyword vimHLGroup    Directory    ModeMsg    Question    StatusLine    VisualNOS
  250. syn keyword vimHLGroup    ErrorMsg    MoreMsg    Scrollbar    StatusLineNC    WarningMsg
  251. syn keyword vimHLGroup    IncSearch    NonText    Search    Title    WildMenu
  252. syn keyword vimHLGroup    LineNr
  253. syn case match
  254.  
  255. " Function Names
  256. syn keyword vimFuncName contained    append    delete    has    localtime    strtrans
  257. syn keyword vimFuncName contained    argc    did_filetype    histadd    maparg    substitute
  258. syn keyword vimFuncName contained    argv    escape    histdel    mapcheck    synID
  259. syn keyword vimFuncName contained    browse    exists    histget    match    synIDattr
  260. syn keyword vimFuncName contained    bufexists    expand    histnr    matchend    synIDtrans
  261. syn keyword vimFuncName contained    bufloaded    filereadable    hlID    matchstr    system
  262. syn keyword vimFuncName contained    bufname    fnamemodify    hlexists    nr2char    tempname
  263. syn keyword vimFuncName contained    bufnr    getcwd    hostname    rename    virtcol
  264. syn keyword vimFuncName contained    bufwinnr    getftime    input    setline    visualmode
  265. syn keyword vimFuncName contained    byte2line    getline    isdirectory    strftime    winbufnr
  266. syn keyword vimFuncName contained    char2nr    getwinposx    libcall    strlen    winheight
  267. syn keyword vimFuncName contained    col    getwinposy    line    strpart    winnr
  268. syn keyword vimFuncName contained    confirm    glob    line2byte
  269. syn match   vimFunc     "\I\i*\s*("    contains=vimFuncName
  270.  
  271. "--- syntax above generated by mkvimvim ---
  272.  
  273. " Special Vim Highlighting
  274.  
  275. " Behave!
  276. " =======
  277. syn match   vimBehave    "[:|]\s*\(behave\|behav\|beha\|beh\|be\)"lc=1 contains=vimCommand skipwhite nextgroup=vimBehaveModel,vimBehaveError
  278. syn keyword vimBehaveModel contained    mswin    xterm
  279. syn match   vimBehaveError contained    "[^ ]\+"
  280.  
  281. " Filetypes
  282. " =========
  283. syn match   vimFiletype    "filet\(ype\|yp\|y\)\=\s\+\I\i*"    skipwhite contains=vimFTCmd,vimFTOption,vimFTError
  284. syn match   vimFTError  contained    "\I\i*"
  285. syn keyword vimFTCmd    contained    filet[ype]
  286. syn keyword vimFTOption contained    on    off
  287.  
  288. " Functions
  289. " =========
  290. syn cluster vimFuncList    contains=vimCommand
  291. syn cluster vimFuncBodyList    contains=vimIsCommand,vimGroup,vimHLGroup,vimFunction,vimFunctionError,vimFuncBody,vimSpecFile,vimConditional,vimOper,vimNumber,vimComment,vimString,vimSubst,vimMark,vimRegister,vimAddress,vimFilter,vimCmplxRepeat,vimComment,vimSet,vimAutoCmd,vimRegion,vimSynLine,vimNotation,vimIsCommand,vimCtrlChar,vimFuncVar
  292. syn match   vimFunction    "\(function\|functio\|functi\|funct\|func\|fun\|fu\)!\=\s\+[A-Z]\w*("me=e-1    contains=@vimFuncList nextgroup=vimFuncBody
  293. syn match   vimFunctionError    "\(function\|functio\|functi\|funct\|func\|fun\|fu\)!\=\s\+[a-z].\{-}("me=e-1    contains=vimCommand   nextgroup=vimFuncBody
  294. syn region  vimFuncBody contained    start=")"    end="\<endf"    contains=@vimFuncBodyList
  295. syn match   vimFuncVar  contained    "a:\(\I\i*\|[0-9]\+\)"
  296.  
  297. syn keyword vimPattern contained    start    skip    end
  298.  
  299. " Special Filenames, Modifiers, Extension Removal
  300. syn match vimSpecFile    "<c\(word\|WORD\)>"    nextgroup=vimSpecFileMod,vimSubst
  301. syn match vimSpecFile    "<\([acs]file\|amatch\|abuf\)>"    nextgroup=vimSpecFileMod,vimSubst
  302. syn match vimSpecFile    "\s%[ \t:]"ms=s+1,me=e-1    nextgroup=vimSpecFileMod,vimSubst
  303. syn match vimSpecFile    "\s%$"ms=s+1        nextgroup=vimSpecFileMod,vimSubst
  304. syn match vimSpecFile    "\s%<"ms=s+1,me=e-1    nextgroup=vimSpecFileMod,vimSubst
  305. syn match vimSpecFile    "#\d\+\|[#%]<\>"        nextgroup=vimSpecFileMod,vimSubst
  306. syn match vimSpecFileMod    "\(:[phtre]\)\+"        contained
  307.  
  308. " Conditionals
  309. syn match vimConditional    "[:|]\s*\(continue\|continu\|contin\|conti\|cont\|con\)\>"lc=1
  310. syn match vimConditional    "[:|]\s*\(endif\|endi\|end\|en\)\>"lc=1
  311. syn match vimConditional    "[:|]\s*\(endwhile\|endwhil\|endwhi\|endwh\|endw\)\>"lc=1
  312. syn match vimConditional    "[:|]\s*\(while\|whil\|whi\|wh\)\>"lc=1
  313. syn match vimConditional    "[:|]\s*break\=\>"lc=1
  314. syn match vimConditional    "[:|]\s*else\>"lc=1
  315. syn match vimConditional    "[:|]\s*elseif\=\>"lc=1
  316. syn match vimConditional    "[:|]\s*if\>"lc=1
  317.  
  318. " Operators
  319. syn match vimOper    "||\|&&\|!=\|>=\|<=\|=\~\|!\~\|>\|<\|+\|-\|=\|\." skipwhite nextgroup=vimString,vimSpecFile
  320.  
  321. " User-Specified Commands
  322. syn cluster vimUserCmdList    contains=vimAddress,vimSyntax,vimHighlight,vimAutoCmd,vimCmplxRepeat,vimComment,vimConditional,vimCtrlChar,vimEscapeBrace,vimFilter,vimFunc,vimFunction,vimGroup,vimHLGroup,vimIsCommand,vimIsCommand,vimMark,vimNotation,vimNumber,vimOper,vimRegion,vimRegister,vimSet,vimSetEqual,vimSetString,vimSpecFile,vimString,vimSubst,vimSubstEnd,vimSubstRange,vimSynLine
  323. syn region  vimUserCmd    transparent oneline matchgroup=vimStatement start="^\s*\(command\|comman\|comma\|comm\|com\)" end="$"        contains=vimUserAttrb,@vimUserCmdList
  324. syn region  vimUserCmd    transparent oneline matchgroup=vimStatement start="[:|]\s*\(command\|comman\|comma\|comm\|com\)"hs=s+1 end="$"    contains=vimUserAttrb,@vimUserCmdList
  325. syn match   vimUserAttrb    contained    "-nargs=[01*?+]"        contains=vimUserAttrbKey,vimOper
  326. syn match   vimUserAttrb    contained transparent  "-complete=\(augroup\|buffer\|command\|dir\|event\|file\|help\|highlight\|menu\|option\|tag\|var\)"    contains=vimUserAttrbCmplt,vimOper
  327. syn match   vimUserAttrb    contained    "-range\(=%\|=[0-9]\+\)\="    contains=vimNumber,vimOper,vimUserAttrbKey
  328. syn match   vimUserAttrb    contained    "-count=[0-9]\+"        contains=vimNumber,vimOper,vimUserAttrbKey
  329. syn match   vimUserAttrb    contained    "-bang\|-register"    contains=vimOper,vimUserAttrbKey
  330. syn keyword vimUserAttrbKey    contained    bang    count    range
  331. syn keyword vimUserAttrbKey    contained    complete    nargs    register
  332. syn keyword vimUserAttrbCmplt    contained    augroup    dir    help    menu    tag
  333. syn keyword vimUserAttrbCmplt    contained    buffer    event    highlight    option    var
  334. syn keyword vimUserAttrbCmplt    contained    command    file
  335.  
  336. " Numbers
  337. " =======
  338. syn match vimNumber    "\<\d\+.\d\+"
  339. syn match vimNumber    "\<\d\+L\="
  340. syn match vimNumber    "-\d\+.\d\+"
  341. syn match vimNumber    "-\d\+L\="
  342. syn match vimNumber    "[[;:]\d\+"lc=1
  343. syn match vimNumber    "0[xX][0-9a-fA-F]\+"
  344. syn match vimNumber    "#[0-9a-fA-F]\+"
  345.  
  346. " Lower Priority Comments: after some vim commands...
  347. " =======================
  348. syn match  vimComment    +\s"[^\-:.%#=*].*$+lc=1    contains=vimTodo,vimCommentString
  349. syn match  vimComment    +\<endif\s\+".*$+lc=5    contains=vimTodo,vimCommentString
  350. syn match  vimComment    +\<else\s\+".*$+lc=4    contains=vimTodo,vimCommentString
  351. syn region vimCommentString    contained oneline start='\S\s\+"'ms=s+1    end='"'
  352.  
  353. " Environment Variables
  354. " =====================
  355. syn match vimEnvvar    "\$\I\i*"
  356. syn match vimEnvvar    "\${\I\i*}"
  357.  
  358. " Try to catch strings, if nothing else matches (therefore it must precede the others!)
  359. "  vmEscapeBrace handles ["]  []"] (ie. stays as string)
  360. syn region    vimEscapeBrace    oneline contained transparent    start="[^\\]\(\\\\\)*\[\^\=\]\=" skip="\\\\\|\\\]" end="\]"me=e-1
  361. syn match    vimPatSep    contained    "\\[|()]"
  362. syn match    vimNotPatSep    contained    "\\\\"
  363. syn region    vimString    oneline    start=+[^:a-zA-Z>!\\]"+lc=1 skip=+\\\\\|\\"+ end=+"+    contains=vimEscapeBrace,vimPatSep,vimNotPatSep
  364. syn region    vimString    oneline    start=+[^:a-zA-Z>!\\]'+lc=1 skip=+\\\\\|\\'+ end=+'+    contains=vimEscapeBrace,vimPatSep,vimNotPatSep
  365. syn region    vimString    oneline    start=+=!+lc=1    skip=+\\\\\|\\!+ end=+!+        contains=vimEscapeBrace,vimPatSep,vimNotPatSep
  366. syn region    vimString    oneline    start="=+"lc=1    skip="\\\\\|\\+" end="+"        contains=vimEscapeBrace,vimPatSep,vimNotPatSep
  367. syn region    vimString    oneline    start="[^\\]+\s*[^a-zA-Z0-9.]"lc=1 skip="\\\\\|\\+" end="+"    contains=vimEscapeBrace,vimPatSep,vimNotPatSep
  368. syn region    vimString    oneline    start="\s/\s*[^a-zA-Z]"lc=1 skip="\\\\\|\\+" end="/"    contains=vimEscapeBrace,vimPatSep,vimNotPatSep
  369. syn match        vimString    contained    +"[^"]*\\$+    skipnl nextgroup=vimStringCont
  370. syn match    vimStringCont    contained    +\(\\\\\|.\)\{-}[^\\]"+
  371.  
  372. " Substitutions
  373. " =============
  374. syn region    vimSubst    oneline     start=":\=s/.\{-}" skip="\\\\\|\\/" end="/"    contains=vimPatSep,vimSubstTwoBS,vimSubstRange,vimNotation nextgroup=vimSubstEnd
  375. syn region    vimSubstEnd    contained oneline start="."lc=1       skip="\\\\\|\\/" end="/"    contains=vimSubstPat,vimSubstTwoBS,vimNotation
  376. syn region    vimSubst    oneline     start=":\=s?.\{-}" skip="\\\\\|\\?" end="?"    contains=vimPatSep,vimSubstTwoBS,vimSubstRange,vimNotation nextgroup=vimSubstEnd
  377. syn region    vimSubstEnd    contained oneline start="."lc=1       skip="\\\\\|\\?" end="?"    contains=vimSubstPat,vimSubstTwoBS,vimNotation
  378. syn region    vimSubstRange    contained oneline start="\["       skip="\\\\\|\\]" end="]"
  379. syn match    vimSubstPat    contained    "\\\d"
  380. syn match    vimSubstTwoBS    contained    "\\\\"
  381.  
  382. " Marks, Registers, Addresses, Filters
  383. syn match    vimMark    "[!,:]'[a-zA-Z0-9]"lc=1
  384. syn match    vimMark    "'[a-zA-Z0-9][,!]"me=e-1
  385. syn match    vimMark    "'[<>][,!]"me=e-1
  386. syn match    vimMark    "[^a-zA-Z]norm\s'[a-zA-Z0-9]"lc=6
  387. syn match    vimMark    "[^a-zA-Z]normal\s'[a-zA-Z0-9]"lc=8
  388. syn match    vimPlainMark    "'[a-zA-Z0-9]"        contained
  389.  
  390. syn match    vimRegister    '[^(,;]"[a-zA-Z0-9\-:.%#*=][^a-zA-Z_"]'lc=1
  391. syn match    vimRegister    '[^a-zA-Z]norm\s\+"[a-zA-Z0-9]'lc=6
  392. syn match    vimRegister    '[^a-zA-Z]normal\s\+"[a-zA-Z0-9]'lc=8
  393. syn match    vimPlainRegister    '"[a-zA-Z0-9\-:.%#*=]'    contained
  394.  
  395. syn match    vimAddress    ",\."lc=1
  396. syn match    vimAddress    "[:|][%.]"lc=1
  397. syn match    vimAddress    "<Bar>%"lc=5
  398.  
  399. syn match    vimFilter    ":\s*!"ms=e
  400. syn match    vimFilter    "[^a-zA-Z]!"lc=1
  401.  
  402. " Complex repeats (:h complex-repeat)
  403. syn match    vimCmplxRepeat    '[^a-zA-Z_/\\]q[0-9a-zA-Z"]'lc=1
  404. syn match    vimCmplxRepeat    '@[0-9a-z".=@:]'
  405.  
  406. " Set command and associated set-options (vimOptions) with comment
  407. syn region    vimSet        matchgroup=vimCommand start="\s*set\>"         end="|"me=e-1 end="$" keepend contains=vimSetEqual,vimOption,vimErrSetting,vimComment,vimSetString
  408. syn region    vimSet        matchgroup=vimCommand start="[:|]\s*set\>"ms=e-3,hs=s+1 end="|"me=e-1 end="$" keepend contains=vimSetEqual,vimOption,vimErrSetting,vimComment,vimSetString
  409. syn region    vimSetEqual    contained    start="="    skip="\\\\\|\\\s" end="[| \t]\|$"me=e-1 contains=vimCtrlChar,vimSetSep,vimNotation
  410. syn region    vimSetString    contained    start=+="+hs=s+1    skip=+\\\\\|\\"+  end=+"+    contains=vimCtrlChar
  411. syn match    vimSetSep    contained    "[,:]"
  412.  
  413. " Autocmd
  414. syn cluster vimAutoCmdCluster    contains=vimAutoCmdOpt,vimAutoEvent,vimComment,vimFilter,vimAuHighlight,vimIsCommand,vimIsCommand2,vimNotation,vimSet,vimSpecFile,vimString,vimAuSyntax,vimNumber,vimPatSep,vimSubstPat,vimEnvvar
  415. syn match   vimIsCommand2    contained transparent "[ \t<Bar>][a-zA-Z_]\+"lc=1  contains=vimCommand
  416. syn keyword vimAutoCmdOpt    contained    nested
  417. syn region  vimAutoCmd        matchgroup=vimAutoSet start=+^\s*\(autocmd\|au\|doautocmd\|doau\)\>+    end="$" keepend contains=@vimAutoCmdCluster
  418. syn region  vimAutoCmd        matchgroup=vimAutoSet start=+[:|]\s*\(autocmd\|au\|doautocmd\|doau\)\>+lc=1    end="$" keepend contains=@vimAutoCmdCluster
  419. syn region  vimAutoCmd        matchgroup=vimAutoSet start=+^\s*\(doautoa\|doautoall\)\>+        end="$" keepend contains=@vimAutoCmdCluster
  420. syn region  vimAutoCmd        matchgroup=vimAutoSet start=+[:|]\s*\(autocmd\|au\|doautocmd\|doau\)\>+lc=1    end="$" keepend contains=@vimAutoCmdCluster
  421.  
  422. " Echo -- prefer strings!
  423. syn region  vimEcho    oneline    start="\<\(echo\|ech\|ec\)\>"   skip="\(\\\\\)*|" end="$\||" contains=vimCommand,vimString,vimOper
  424.  
  425. " Syntax
  426. "=======
  427. syn match   vimGroupList    contained    "@\=[^ \t,]*"    contains=vimGroupSpecial,vimPatSep
  428. syn match   vimGroupList    contained    "@\=[^ \t,]*,"    nextgroup=vimGroupList contains=vimGroupSpecial,vimPatSep
  429. syn keyword vimGroupSpecial    contained    ALL    ALLBUT
  430. syn match   vimSynError    contained    "\i\+"
  431. syn match   vimSynError    contained    "\i\+="    nextgroup=vimGroupList
  432. syn match   vimSynContains    contained    "contains="    nextgroup=vimGroupList
  433. syn match   vimSynNextgroup    contained    "nextgroup="    nextgroup=vimGroupList
  434.  
  435. syn match   vimSyntax    "[:|]\s*\(syntax\|synta\|synt\|syn\|sy\)"    contains=vimCommand skipwhite nextgroup=vimSynType,vimComment
  436. syn match   vimAuSyntax    contained    "\s+\(syntax\|synta\|synt\|syn\|sy\)"    contains=vimCommand skipwhite nextgroup=vimSynType,vimComment
  437.  
  438. " Syntax: case
  439. syn keyword vimSynType        contained    case    skipwhite nextgroup=vimSynCase,vimSynCaseError
  440. syn match   vimSynCaseError    contained    "\i\+"
  441. syn keyword vimSynCase        contained    ignore    match
  442.  
  443. " Syntax: clear
  444. syn keyword vimSynType        contained    clear    skipwhite nextgroup=vimGroupList
  445.  
  446. " Syntax: cluster
  447. syn keyword vimSynType        contained    cluster        skipwhite nextgroup=vimClusterName
  448. syn region  vimClusterName    contained    matchgroup=vimGroupName start="\k\+" skip="\\\\\|\\|" end="$\||" contains=vimGroupAdd,vimGroupRem,vimSynContains,vimSynError
  449. syn match   vimGroupAdd        contained    "add="        nextgroup=vimGroupList
  450. syn match   vimGroupRem        contained    "remove="    nextgroup=vimGroupList
  451.  
  452. " Syntax: include
  453. syn keyword vimSynType        contained    include        skipwhite nextgroup=vimGroupList
  454.  
  455. " Syntax: keyword
  456. syn keyword vimSynType        contained    keyword        skipwhite nextgroup=vimSynKeyRegion
  457. syn region  vimSynKeyRegion    contained oneline matchgroup=vimGroupName start="\k\+" skip="\\\\\|\\|" end="$\||" contains=vimSynNextgroup,vimSynKeyOpt
  458. syn match   vimSynKeyOpt    contained    "\<\(contained\|transparent\|skipempty\|skipwhite\|skipnl\)\>"
  459.  
  460. " Syntax: match
  461. syn keyword vimSynType        contained    match    skipwhite nextgroup=vimSynMatchRegion
  462. syn region  vimSynMatchRegion    contained oneline keepend matchgroup=vimGroupName start="\k\+" end="$" contains=vimComment,vimSynContains,vimSynError,vimSynKeyOpt,vimSynNextgroup,vimSynRegPat
  463.  
  464. " Syntax: off
  465. syn keyword vimSynType        contained    off
  466.  
  467. " Syntax: region
  468. syn keyword vimSynType        contained    region    skipwhite nextgroup=vimSynRegion
  469. syn region  vimSynRegion    contained oneline matchgroup=vimGroupName start="\k\+" skip="\\\\\|\\|" end="$\||" contains=vimSynContains,vimSynNextgroup,vimSynRegOpt,vimSynReg,vimSynMtchGrp
  470. syn match   vimSynRegOpt    contained    "\<\(contained\|transparent\|skipempty\|skipwhite\|skipnl\|oneline\|keepend\)\>"
  471. syn match   vimSynReg        contained    "\(start\|skip\|end\)="he=e-1    nextgroup=vimSynRegPat
  472. syn match   vimSynMtchGrp    contained    "matchgroup="
  473. syn region  vimSynRegPat    contained oneline    start="!"  skip="\\\\\|\\!"  end="!"  contains=vimPatSep,vimNotPatSep,vimSynPatRange,vimSynNotPatRange nextgroup=vimSynPatMod
  474. syn region  vimSynRegPat    contained oneline    start="%"  skip="\\\\\|\\-"  end="%"  contains=vimPatSep,vimNotPatSep,vimSynPatRange,vimSynNotPatRange nextgroup=vimSynPatMod
  475. syn region  vimSynRegPat    contained oneline    start="'"  skip="\\\\\|\\'"  end="'"  contains=vimPatSep,vimNotPatSep,vimSynPatRange,vimSynNotPatRange nextgroup=vimSynPatMod
  476. syn region  vimSynRegPat    contained oneline    start="+"  skip="\\\\\|\\+"  end="+"  contains=vimPatSep,vimNotPatSep,vimSynPatRange,vimSynNotPatRange nextgroup=vimSynPatMod
  477. syn region  vimSynRegPat    contained oneline    start="@"  skip="\\\\\|\\@"  end="@"  contains=vimPatSep,vimNotPatSep,vimSynPatRange,vimSynNotPatRange nextgroup=vimSynPatMod
  478. syn region  vimSynRegPat    contained oneline    start='"'  skip='\\\\\|\\"'  end='"'  contains=vimPatSep,vimNotPatSep,vimSynPatRange,vimSynNotPatRange nextgroup=vimSynPatMod
  479. syn region  vimSynRegPat    contained oneline    start='/'  skip='\\\\\|\\/'  end='/'  contains=vimPatSep,vimNotPatSep,vimSynPatRange,vimSynNotPatRange nextgroup=vimSynPatMod
  480. syn region  vimSynRegPat    contained oneline    start=','  skip='\\\\\|\\,'  end=','  contains=vimPatSep,vimNotPatSep,vimSynPatRange,vimSynNotPatRange nextgroup=vimSynPatMod
  481. syn region  vimSynRegPat    contained oneline    start='\$' skip='\\\\\|\\\$' end='\$' contains=vimPatSep,vimNotPatSep,vimSynPatRange,vimSynNotPatRange nextgroup=vimSynPatMod
  482. syn match   vimSynPatMod    contained    "\(hs\|ms\|me\|hs\|he\|rs\|re\)=[se]\([-+][0-9]\+\)\="
  483. syn match   vimSynPatMod    contained    "\(hs\|ms\|me\|hs\|he\|rs\|re\)=[se]\([-+][0-9]\+\)\=," nextgroup=vimSynPatMod
  484. syn match   vimSynPatMod    contained    "lc=[0-9]\+"
  485. syn match   vimSynPatMod    contained    "lc=[0-9]\+," nextgroup=vimSynPatMod
  486. syn region  vimSynPatRange    contained oneline start="\["    skip="\\\\\|\\]"   end="]"
  487. syn match   vimSynNotPatRange    contained    "\\\\\|\\\["
  488.  
  489. " Syntax: sync
  490. syn keyword vimSynType        contained    sync    skipwhite nextgroup=vimSyncC,vimSyncLines,vimSyncMatch,vimSyncError,vimSyncLinecont
  491. syn match   vimSyncError    contained    "\i\+"
  492. syn keyword vimSyncC    contained    ccomment    clear
  493. syn keyword vimSyncMatch    contained    match    skipwhite nextgroup=vimSyncGroupName
  494. syn keyword vimSyncLinecont    contained    linecont    skipwhite nextgroup=vimSynRegPat
  495. syn match   vimSyncLines    contained    "\(minlines\|maxlines\|lines\)=" nextgroup=vimNumber
  496. syn match   vimSyncGroupName    contained    "\k\+" skipwhite nextgroup=vimSyncKey
  497. syn match   vimSyncKey        contained    "\<groupthere\|grouphere\>"    skipwhite nextgroup=vimSyncGroup
  498. syn match   vimSyncGroup    contained    "\k\+" skipwhite nextgroup=vimSynRegPat,vimSyncNone
  499. syn keyword vimSyncNone        contained    NONE
  500.  
  501. " Additional IsCommand stuff, here by reasons of precedence
  502. " ====================
  503. syn match vimIsCommand    "<Bar>\s*[a-zA-Z]\+"    transparent contains=vimCommand,vimNotation
  504.  
  505. " Highlighting
  506. " ============
  507. syn match   vimHighlight    "[:|]\s*\(highlight\|highligh\|highlig\|highli\|highl\|high\|hig\|hi\)"    skipwhite nextgroup=vimHiLink,vimHiClear,vimHiKeyList,vimComment
  508. syn match   vimAuHighlight    contained    "\s+\(highlight\|highligh\|highlig\|highli\|highl\|high\|hig\|hi\)"    skipwhite nextgroup=vimHiLink,vimHiClear,vimHiKeyList,vimComment
  509.  
  510. syn match   vimHiGroup    contained    "\i\+"
  511. syn case ignore
  512. syn keyword vimHiAttrib    contained    none bold inverse italic reverse standout underline
  513. syn keyword vimFgBgAttrib    contained    none bg background fg foreground
  514. syn case match
  515. syn match   vimHiAttribList    contained    "\i\+"    contains=vimHiAttrib
  516. syn match   vimHiAttribList    contained    "\i\+,"he=e-1    contains=vimHiAttrib nextgroup=vimHiAttribList,vimHiAttrib
  517. syn case ignore
  518. syn keyword vimHiCtermColor    contained    black    darkcyan    darkred    lightcyan    lightred
  519. syn keyword vimHiCtermColor    contained    blue    darkgray    gray    lightgray    magenta
  520. syn keyword vimHiCtermColor    contained    brown    darkgreen    green    lightgreen    red
  521. syn keyword vimHiCtermColor    contained    cyan    darkgrey    grey    lightgrey    white
  522. syn keyword vimHiCtermColor    contained    darkBlue    darkmagenta    lightblue    lightmagenta    yellow
  523. syn case match
  524. syn match   vimHiFontname    contained    "[a-zA-z\-*]\+"
  525. syn match   vimHiGuiFontname    contained    "'[a-zA-z\-* ]\+'"
  526. syn match   vimHiGuiRgb    contained    "#\x\{6}"
  527. syn match   vimHiCtermError    contained    "[^0-9]\i*"
  528.  
  529. " Highlighting: hi group key=arg ...
  530. syn cluster vimHiCluster contains=vimHiGroup,vimHiTerm,vimHiCTerm,vimHiStartStop,vimHiCtermFgBg,vimHiGui,vimHiGuiFont,vimHiGuiFgBg,vimHiKeyError
  531. syn region vimHiKeyList    contained oneline start="\i\+" skip="\\\\\|\\|" end="$\||"    contains=@vimHiCluster
  532. syn match  vimHiKeyError    contained    "\i\+="he=e-1
  533. syn match  vimHiTerm    contained    "[tT][eE][rR][mM]="he=e-1            nextgroup=vimHiAttribList
  534. syn match  vimHiStartStop    contained    "\([sS][tT][aA][rR][tT]\|[sS][tT][oO][pP]\)="he=e-1    nextgroup=vimHiTermcap,vimOption
  535. syn match  vimHiCTerm    contained    "[cC][tT][eE][rR][mM]="he=e-1            nextgroup=vimHiAttribList
  536. syn match  vimHiCtermFgBg    contained    "[cC][tT][eE][rR][mM][fFbB][gG]="he=e-1        nextgroup=vimNumber,vimHiCtermColor,vimFgBgAttrib,vimHiCtermError
  537. syn match  vimHiGui    contained    "[gG][uU][iI]="he=e-1            nextgroup=vimHiAttribList
  538. syn match  vimHiGuiFont    contained    "[fF][oO][nN][tT]="he=e-1            nextgroup=vimHiFontname
  539. syn match  vimHiGuiFgBg    contained    "[gG][uU][iI][fFbB][gG]="he=e-1            nextgroup=vimHiGroup,vimHiGuiFontname,vimHiGuiRgb,vimFgBgAttrib
  540. syn match  vimHiTermcap    contained    "\S\+"        contains=vimNotation
  541.  
  542. " Highlight: clear
  543. syn keyword vimHiClear    contained    clear        nextgroup=vimHiGroup
  544.  
  545. " Highlight: link
  546. syn region vimHiLink    contained oneline matchgroup=vimCommand start="link" end="$"    contains=vimHiGroup,vimGroup
  547.  
  548. " Angle-Bracket Notation (tnx to Michael Geddes)
  549. " ======================
  550. syn case ignore
  551. syn match vimNotation    "<\([scam]-\)\{0,4}\(f[0-9]\{1,2}\|[^ \t:]\|cr\|lf\|linefeed\|return\|del\(ete\)\ =\|bs\|backspace\|tab\|esc\|right\|left\|Help\|Undo\|Insert\|Ins\|k\=Home\|k \=End\|kPlus\|kMinus\|kDivide\|kMultiply\|kEnter\|k\=\(page\)\=\(\|down\|up\)\)>" contains=vimBracket
  552. syn match vimNotation    "<\([scam2-4]-\)\{0,4}\(right\|left\|middle\)\(mouse\|drag\|release\)>" contains=vimBracket
  553. syn match vimNotation    "<\(bslash\|space\|bar\|nop\|nul\|lt\)>"        contains=vimBracket
  554. syn match vimNotation    '<C-R>[0-9a-z"%#:.\-=]'he=e-1            contains=vimBracket
  555. syn match vimBracket contained    "[<>]"
  556. syn match vimBracket contained    "[<>]"
  557. syn case match
  558.  
  559. " Control Characters
  560. " ==================
  561. syn match vimCtrlChar    "[- -]"
  562.  
  563. " Beginners - Patterns that involve ^
  564. " =========
  565. syn match  vimLineComment    +^[ \t:]*".*$+        contains=vimTodo,vimCommentString,vimCommentTitle
  566. syn match  vimCommentTitle    "\u\a*\(\s\+\a\+\)*:"    contained
  567. syn region vimEcho    oneline    start="^[ \t:]*\(echo\|ech\|ec\)\>" skip="\(\\\\\)*|" end="$\||" contains=vimCommand,vimString,vimOper
  568. syn match  vimBehave    "^[ \t:]*\(behave\|behav\|beha\|beh\|be\)" contains=vimCommand skipwhite nextgroup=vimBehaveModel,vimBehaveError
  569. syn match  vimConditional    "^[ \t:]*\(continue\|continu\|contin\|conti\|cont\|con\)\>"
  570. syn match  vimConditional    "^[ \t:]*\(endif\|endi\|end\|en\)\>"
  571. syn match  vimConditional    "^[ \t:]*\(endwhile\|endwhil\|endwhi\|endwh\|endw\)\>"
  572. syn match  vimConditional    "^[ \t:]*\(while\|whil\|whi\|wh\)\>"
  573. syn match  vimConditional    "^[ \t:]*\(break\|brea\)\=\>"
  574. syn match  vimConditional    "^[ \t:]*\(else\|els\|el\)\>"
  575. syn match  vimConditional    "^[ \t:]*\(elseif\|elsei\)\=\>"
  576. syn match  vimConditional    "^[ \t:]*if\>"
  577. syn match  vimSyntax    "^[ \t:]*\(syntax\|synta\|synt\|syn\|sy\)"    contains=vimCommand skipwhite nextgroup=vimSynType,vimComment
  578. syn match  vimHighlight    "^[ \t:]*\(highlight\|highligh\|highlig\|highli\|highl\|high\|hig\|hi\)"    skipwhite nextgroup=vimHiLink,vimHiClear,vimHiKeyList,vimComment
  579. syn match  vimContinue    "^\s*\\"
  580.  
  581.  
  582. " Highlighting Settings
  583. " ====================
  584. if !exists("did_vim_syntax_inits")
  585.   let did_vim_syntax_inits = 1
  586.  
  587.   " The default methods for highlighting.  Can be overridden later
  588.   hi link vimAuHighlight    vimHighlight
  589.  
  590.   hi link vimAddress    vimMark
  591.   hi link vimAutoCmdOpt    vimOption
  592.   hi link vimAutoSet    vimCommand
  593.   hi link vimBehaveError    vimError
  594.   hi link vimCommentString    vimString
  595.   hi link vimConditional    vimStatement
  596.   hi link vimErrSetting    vimError
  597.   hi link vimFgBgAttrib    vimHiAttrib
  598.   hi link vimFTCmd    vimCommand
  599.   hi link vimFTError    vimError
  600.   hi link vimFilter    vimOper
  601.   hi link vimFunctionError    vimError
  602.   hi link vimGroupAdd    vimSynOption
  603.   hi link vimGroupRem    vimSynOption
  604.   hi link vimHLGroup    vimGroup
  605.   hi link vimHiAttribList    vimError
  606.   hi link vimHiCTerm    vimHiTerm
  607.   hi link vimHiCtermError    vimError
  608.   hi link vimHiCtermFgBg    vimHiTerm
  609.   hi link vimHiGroup    vimGroupName
  610.   hi link vimHiGui    vimHiTerm
  611.   hi link vimHiGuiFgBg    vimHiTerm
  612.   hi link vimHiGuiFont    vimHiTerm
  613.   hi link vimHiGuiRgb    vimNumber
  614.   hi link vimHiKeyError    vimError
  615.   hi link vimHiStartStop    vimHiTerm
  616.   hi link vimHighlight    vimCommand
  617.   hi link vimKeyCode    vimSpecFile
  618.   hi link vimKeyCodeError    vimError
  619.   hi link vimLineComment    vimComment
  620.   hi link vimNotPatSep    vimString
  621.   hi link vimPlainMark    vimMark
  622.   hi link vimPlainRegister    vimRegister
  623.   hi link vimSetString    vimString
  624.   hi link vimSpecFileMod    vimSpecFile
  625.   hi link vimStringCont    vimString
  626.   hi link vimSynCaseError    vimError
  627.   hi link vimSynContains    vimSynOption
  628.   hi link vimSynKeyOpt    vimSynOption
  629.   hi link vimSynMtchGrp    vimSynOption
  630.   hi link vimSynNextgroup    vimSynOption
  631.   hi link vimSynNotPatRange    vimSynRegPat
  632.   hi link vimSynPatRange    vimString
  633.   hi link vimSynRegOpt    vimSynOption
  634.   hi link vimSynRegPat    vimString
  635.   hi link vimSynType    vimSpecial
  636.   hi link vimSyncGroup    vimGroupName
  637.   hi link vimSyncGroupName    vimGroupName
  638.   hi link vimUserAttrb    vimSpecial
  639.   hi link vimUserAttrbCmplt    vimSpecial
  640.   hi link vimUserAttrbKey    vimOption
  641.   hi link vimUserCmd    vimCommand
  642.  
  643.   hi link vimAutoEvent    Type
  644.   hi link vimBracket    Delimiter
  645.   hi link vimCmplxRepeat    SpecialChar
  646.   hi link vimCommand    Statement
  647.   hi link vimComment    Comment
  648.   hi link vimCommentTitle    PreProc
  649.   hi link vimContinue    Special
  650.   hi link vimCtrlChar    SpecialChar
  651.   hi link vimEnvvar    PreProc
  652.   hi link vimError    Error
  653.   hi link vimFuncName    Function
  654.   hi link vimFuncVar    Identifier
  655.   hi link vimGroup    Type
  656.   hi link vimGroupSpecial    Special
  657.   hi link vimHLMod    PreProc
  658.   hi link vimHiAttrib    PreProc
  659.   hi link vimHiTerm    Type
  660.   hi link vimKeyword    Statement
  661.   hi link vimMark    Number
  662.   hi link vimNotation    Special
  663.   hi link vimNumber    Number
  664.   hi link vimOper    Operator
  665.   hi link vimOption    PreProc
  666.   hi link vimPatSep    SpecialChar
  667.   hi link vimPattern    Type
  668.   hi link vimRegister    SpecialChar
  669.   hi link vimSetSep    Statement
  670.   hi link vimSpecFile    Identifier
  671.   hi link vimSpecial    Type
  672.   hi link vimStatement    Statement
  673.   hi link vimString    String
  674.   hi link vimSubstPat    SpecialChar
  675.   hi link vimSynCase    Type
  676.   hi link vimSynCaseError    Error
  677.   hi link vimSynError    Error
  678.   hi link vimSynOption    Special
  679.   hi link vimSynReg    Type
  680.   hi link vimSyncC    Type
  681.   hi link vimSyncError    Error
  682.   hi link vimSyncKey    Type
  683.   hi link vimSyncNone    Type
  684.   hi link vimTodo    Todo
  685. endif
  686.  
  687. let b:current_syntax = "vim"
  688.  
  689. " vim: ts=17
  690.