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 / vim54rt.sit / runtime / syntax / vim.vim < prev    next >
Encoding:
Text File  |  1999-08-14  |  39.3 KB  |  686 lines  |  [TEXT/ALFA]

  1. " Vim syntax file
  2. " Language:    Vim 5.4 script
  3. " Maintainer:    Dr. Charles E. Campbell, Jr. <cec@gryphon.gsfc.nasa.gov>
  4. " Last Change:    July 21, 1999
  5. " Version:    5.4
  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 keyword vimAutoEvent contained    BufCreate    BufReadPost    FileAppendPre    FilterReadPre    Syntax
  228. syn keyword vimAutoEvent contained    BufDelete    BufReadPre    FileChangedShell    FilterWritePost    TermChanged
  229. syn keyword vimAutoEvent contained    BufEnter    BufUnload    FileReadPost    FilterWritePre    User
  230. syn keyword vimAutoEvent contained    BufFilePost    BufWrite    FileReadPre    FocusGained    VimEnter
  231. syn keyword vimAutoEvent contained    BufFilePre    BufWritePost    FileType    FocusLost    VimLeave
  232. syn keyword vimAutoEvent contained    BufHidden    BufWritePre    FileWritePost    GUIEnter    VimLeavePre
  233. syn keyword vimAutoEvent contained    BufLeave    CursorHold    FileWritePre    StdinReadPost    WinEnter
  234. syn keyword vimAutoEvent contained    BufNewFile    FileAppendPost    FilterReadPost    StdinReadPre    WinLeave
  235. syn keyword vimAutoEvent contained    BufRead
  236.  
  237. " Highlight commonly used Groupnames
  238. syn keyword vimGroup    Comment    Identifier    Keyword    Type    Delimiter
  239. syn keyword vimGroup    Constant    Function    Exception    StorageClass    SpecialComment
  240. syn keyword vimGroup    String    Statement    PreProc    Structure    Debug
  241. syn keyword vimGroup    Character    Conditional    Include    Typedef    Ignore
  242. syn keyword vimGroup    Number    Repeat    Define    Special    Error
  243. syn keyword vimGroup    Boolean    Label    Macro    SpecialChar    Todo
  244. syn keyword vimGroup    Float    Operator    PreCondit    Tag
  245.  
  246. " Default highlighting groups
  247. syn keyword vimHLGroup    Cursor    Menu    Normal    SpecialKey    Visual
  248. syn keyword vimHLGroup    Directory    ModeMsg    Question    StatusLine    VisualNOS
  249. syn keyword vimHLGroup    ErrorMsg    MoreMsg    Scrollbar    StatusLineNC    WarningMsg
  250. syn keyword vimHLGroup    IncSearch    NonText    Search    Title    WildMenu
  251. syn keyword vimHLGroup    LineNr
  252.  
  253. " Function Names
  254. syn keyword vimFuncName contained    append    delete    has    line2byte    strtrans
  255. syn keyword vimFuncName contained    argc    did_filetype    histadd    localtime    substitute
  256. syn keyword vimFuncName contained    argv    escape    histdel    maparg    synID
  257. syn keyword vimFuncName contained    browse    exists    histget    mapcheck    synIDattr
  258. syn keyword vimFuncName contained    bufexists    expand    histnr    match    synIDtrans
  259. syn keyword vimFuncName contained    bufloaded    filereadable    hlID    matchend    system
  260. syn keyword vimFuncName contained    bufname    fnamemodify    hlexists    matchstr    tempname
  261. syn keyword vimFuncName contained    bufnr    getcwd    hostname    nr2char    virtcol
  262. syn keyword vimFuncName contained    bufwinnr    getftime    input    setline    visualmode
  263. syn keyword vimFuncName contained    byte2line    getline    isdirectory    strftime    winbufnr
  264. syn keyword vimFuncName contained    char2nr    getwinposx    libcall    strlen    winheight
  265. syn keyword vimFuncName contained    col    getwinposy    line    strpart    winnr
  266. syn keyword vimFuncName contained    confirm    glob
  267. syn match   vimFunc     "\I\i*\s*("    contains=vimFuncName
  268.  
  269. "--- syntax above generated by mkvimvim ---
  270.  
  271. " Special Vim Highlighting
  272.  
  273. " Behave!
  274. " =======
  275. syn match   vimBehave    "[:|]\s*\(behave\|behav\|beha\|beh\|be\)"lc=1 contains=vimCommand skipwhite nextgroup=vimBehaveModel,vimBehaveError
  276. syn keyword vimBehaveModel contained    mswin    xterm
  277. syn match   vimBehaveError contained    "[^ ]\+"
  278.  
  279. " Filetypes
  280. " =========
  281. syn keyword vimFiletype    filetype    skipwhite    nextgroup=vimFTOnOff,vimFTError
  282. syn keyword vimFTOnOff    on    off
  283. syn match   vimFTError    contained    "\I\i*"
  284.  
  285. " Functions
  286. " =========
  287. syn cluster vimFuncList    contains=vimCommand
  288. 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
  289. syn match   vimFunction    "\(function\|functio\|functi\|funct\|func\|fun\|fu\)!\=\s\+[A-Z]\w*("me=e-1    contains=@vimFuncList nextgroup=vimFuncBody
  290. syn match   vimFunctionError    "\(function\|functio\|functi\|funct\|func\|fun\|fu\)!\=\s\+[a-z].\{-}("me=e-1    contains=vimCommand   nextgroup=vimFuncBody
  291. syn region  vimFuncBody contained    start=")"    end="\<endf"    contains=@vimFuncBodyList
  292. syn match   vimFuncVar  contained    "a:\(\I\i*\|[0-9]\+\)"
  293.  
  294. syn keyword vimPattern contained    start    skip    end
  295.  
  296. " Special Filenames, Modifiers, Extension Removal
  297. syn match vimSpecFile    "<c\(word\|WORD\)>"    nextgroup=vimSpecFileMod,vimSubst
  298. syn match vimSpecFile    "<\([acs]file\|amatch\|abuf\)>"    nextgroup=vimSpecFileMod,vimSubst
  299. syn match vimSpecFile    "\s%[ \t:]"ms=s+1,me=e-1    nextgroup=vimSpecFileMod,vimSubst
  300. syn match vimSpecFile    "\s%$"ms=s+1        nextgroup=vimSpecFileMod,vimSubst
  301. syn match vimSpecFile    "\s%<"ms=s+1,me=e-1    nextgroup=vimSpecFileMod,vimSubst
  302. syn match vimSpecFile    "#\d\+\|[#%]<\>"        nextgroup=vimSpecFileMod,vimSubst
  303. syn match vimSpecFileMod    "\(:[phtre]\)\+"        contained
  304.  
  305. " Conditionals
  306. syn match vimConditional    "[:|]\s*\(continue\|continu\|contin\|conti\|cont\|con\)\>"lc=1
  307. syn match vimConditional    "[:|]\s*\(endif\|endi\|end\|en\)\>"lc=1
  308. syn match vimConditional    "[:|]\s*\(endwhile\|endwhil\|endwhi\|endwh\|endw\)\>"lc=1
  309. syn match vimConditional    "[:|]\s*\(while\|whil\|whi\|wh\)\>"lc=1
  310. syn match vimConditional    "[:|]\s*break\=\>"lc=1
  311. syn match vimConditional    "[:|]\s*else\>"lc=1
  312. syn match vimConditional    "[:|]\s*elseif\=\>"lc=1
  313. syn match vimConditional    "[:|]\s*if\>"lc=1
  314.  
  315. " Operators
  316. syn match vimOper    "||\|&&\|!=\|>=\|<=\|=\~\|!\~\|>\|<\|+\|-\|=\|\." skipwhite nextgroup=vimString,vimSpecFile
  317.  
  318. " User-Specified Commands
  319. 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
  320. syn region  vimUserCmd    transparent oneline matchgroup=vimStatement start="^\s*\(command\|comman\|comma\|comm\|com\)" end="$"        contains=vimUserAttrb,@vimUserCmdList
  321. syn region  vimUserCmd    transparent oneline matchgroup=vimStatement start="[:|]\s*\(command\|comman\|comma\|comm\|com\)"hs=s+1 end="$"    contains=vimUserAttrb,@vimUserCmdList
  322. syn match   vimUserAttrb    contained    "-nargs=[01*?+]"        contains=vimUserAttrbKey,vimOper
  323. syn match   vimUserAttrb    contained transparent  "-complete=\(augroup\|buffer\|command\|dir\|event\|file\|help\|highlight\|menu\|option\|tag\|var\)"    contains=vimUserAttrbCmplt,vimOper
  324. syn match   vimUserAttrb    contained    "-range\(=%\|=[0-9]\+\)\="    contains=vimNumber,vimOper,vimUserAttrbKey
  325. syn match   vimUserAttrb    contained    "-count=[0-9]\+"        contains=vimNumber,vimOper,vimUserAttrbKey
  326. syn match   vimUserAttrb    contained    "-bang\|-register"    contains=vimOper,vimUserAttrbKey
  327. syn keyword vimUserAttrbKey    contained    bang    count    range
  328. syn keyword vimUserAttrbKey    contained    complete    nargs    register
  329. syn keyword vimUserAttrbCmplt    contained    augroup    dir    help    menu    tag
  330. syn keyword vimUserAttrbCmplt    contained    buffer    event    highlight    option    var
  331. syn keyword vimUserAttrbCmplt    contained    command    file
  332.  
  333. " Numbers
  334. " =======
  335. syn match vimNumber    "\<\d\+.\d\+"
  336. syn match vimNumber    "\<\d\+L\="
  337. syn match vimNumber    "-\d\+.\d\+"
  338. syn match vimNumber    "-\d\+L\="
  339. syn match vimNumber    "[[;:]\d\+"lc=1
  340. syn match vimNumber    "0[xX][0-9a-fA-F]\+"
  341. syn match vimNumber    "#[0-9a-fA-F]\+"
  342.  
  343. " Lower Priority Comments: after some vim commands...
  344. " =======================
  345. syn match  vimComment    +\s"[^\-:.%#=*].*$+lc=1    contains=vimTodo,vimCommentString
  346. syn match  vimComment    +\<endif\s\+".*$+lc=5    contains=vimTodo,vimCommentString
  347. syn match  vimComment    +\<else\s\+".*$+lc=4    contains=vimTodo,vimCommentString
  348. syn region vimCommentString    contained oneline start='\S\s\+"'ms=s+1    end='"'
  349.  
  350. " Environment Variables
  351. " =====================
  352. syn match vimEnvvar    "\$\I\i*"
  353. syn match vimEnvvar    "\${\I\i*}"
  354.  
  355. " Try to catch strings, if nothing else matches (therefore it must precede the others!)
  356. "  vmEscapeBrace handles ["]  []"] (ie. stays as string)
  357. syn region    vimEscapeBrace    oneline contained transparent    start="[^\\]\(\\\\\)*\[\^\=\]\=" skip="\\\\\|\\\]" end="\]"me=e-1
  358. syn match    vimPatSep    contained    "\\[|()]"
  359. syn match    vimNotPatSep    contained    "\\\\"
  360. syn region    vimString    oneline    start=+[^:a-zA-Z>!\\]"+lc=1 skip=+\\\\\|\\"+ end=+"+    contains=vimEscapeBrace,vimPatSep,vimNotPatSep
  361. syn region    vimString    oneline    start=+[^:a-zA-Z>!\\]'+lc=1 skip=+\\\\\|\\'+ end=+'+    contains=vimEscapeBrace,vimPatSep,vimNotPatSep
  362. syn region    vimString    oneline    start=+=!+lc=1    skip=+\\\\\|\\!+ end=+!+        contains=vimEscapeBrace,vimPatSep,vimNotPatSep
  363. syn region    vimString    oneline    start="=+"lc=1    skip="\\\\\|\\+" end="+"        contains=vimEscapeBrace,vimPatSep,vimNotPatSep
  364. syn region    vimString    oneline    start="[^\\]+\s*[^a-zA-Z0-9.]"lc=1 skip="\\\\\|\\+" end="+"    contains=vimEscapeBrace,vimPatSep,vimNotPatSep
  365. syn region    vimString    oneline    start="\s/\s*[^a-zA-Z]"lc=1 skip="\\\\\|\\+" end="/"    contains=vimEscapeBrace,vimPatSep,vimNotPatSep
  366. syn match        vimString    contained    +"[^"]*\\$+    skipnl nextgroup=vimStringCont
  367. syn match    vimStringCont    contained    +\(\\\\\|.\)\{-}[^\\]"+
  368.  
  369. " Substitutions
  370. " =============
  371. syn region    vimSubst    oneline     start=":\=s/.\{-}" skip="\\\\\|\\/" end="/"    contains=vimPatSep,vimSubstTwoBS,vimSubstRange,vimNotation nextgroup=vimSubstEnd
  372. syn region    vimSubstEnd    contained oneline start="."lc=1       skip="\\\\\|\\/" end="/"    contains=vimSubstPat,vimSubstTwoBS,vimNotation
  373. syn region    vimSubst    oneline     start=":\=s?.\{-}" skip="\\\\\|\\?" end="?"    contains=vimPatSep,vimSubstTwoBS,vimSubstRange,vimNotation nextgroup=vimSubstEnd
  374. syn region    vimSubstEnd    contained oneline start="."lc=1       skip="\\\\\|\\?" end="?"    contains=vimSubstPat,vimSubstTwoBS,vimNotation
  375. syn region    vimSubstRange    contained oneline start="\["       skip="\\\\\|\\]" end="]"
  376. syn match    vimSubstPat    contained    "\\\d"
  377. syn match    vimSubstTwoBS    contained    "\\\\"
  378.  
  379. " Marks, Registers, Addresses, Filters
  380. syn match    vimMark    "[!,:]'[a-zA-Z0-9]"lc=1
  381. syn match    vimMark    "'[a-zA-Z0-9][,!]"me=e-1
  382. syn match    vimMark    "'[<>][,!]"me=e-1
  383. syn match    vimMark    "[^a-zA-Z]norm\s'[a-zA-Z0-9]"lc=6
  384. syn match    vimMark    "[^a-zA-Z]normal\s'[a-zA-Z0-9]"lc=8
  385. syn match    vimPlainMark    "'[a-zA-Z0-9]"        contained
  386.  
  387. syn match    vimRegister    '[^(,;]"[a-zA-Z0-9\-:.%#*=][^a-zA-Z_"]'lc=1
  388. syn match    vimRegister    '[^a-zA-Z]norm\s\+"[a-zA-Z0-9]'lc=6
  389. syn match    vimRegister    '[^a-zA-Z]normal\s\+"[a-zA-Z0-9]'lc=8
  390. syn match    vimPlainRegister    '"[a-zA-Z0-9\-:.%#*=]'    contained
  391.  
  392. syn match    vimAddress    ",\."lc=1
  393. syn match    vimAddress    "[:|][%.]"lc=1
  394. syn match    vimAddress    "<Bar>%"lc=5
  395.  
  396. syn match    vimFilter    ":\s*!"ms=e
  397. syn match    vimFilter    "[^a-zA-Z]!"lc=1
  398.  
  399. " Complex repeats (:h complex-repeat)
  400. syn match    vimCmplxRepeat    '[^a-zA-Z_/\\]q[0-9a-zA-Z"]'lc=1
  401. syn match    vimCmplxRepeat    '@[0-9a-z".=@:]'
  402.  
  403. " Set command and associated set-options (vimOptions) with comment
  404. syn region    vimSet        matchgroup=vimCommand start="\s*set\>" end="|\|$"    keepend contains=vimSetEqual,vimOption,vimErrSetting,vimComment,vimSetString
  405. syn region    vimSetEqual    contained    start="="    skip="\\\\\|\\\s" end="[| \t]\|$"me=e-1 contains=vimCtrlChar,vimSetSep,vimNotation
  406. syn region    vimSetString    contained    start=+="+hs=s+1    skip=+\\\\\|\\"+  end=+"+    contains=vimCtrlChar
  407. syn match    vimSetSep    contained    "[,:]"
  408.  
  409. " Autocmd
  410. syn cluster vimAutoCmdCluster    contains=vimAutoCmdOpt,vimAutoEvent,vimComment,vimFilter,vimAuHighlight,vimIsCommand,vimIsCommand2,vimNotation,vimSet,vimSpecFile,vimString,vimAuSyntax,vimNumber,vimPatSep,vimSubstPat,vimEnvvar
  411. syn match   vimIsCommand2    contained transparent "[ \t<Bar>][a-zA-Z_]\+"lc=1  contains=vimCommand
  412. syn keyword vimAutoCmdOpt    contained    nested
  413. syn region  vimAutoCmd        matchgroup=vimAutoSet start=+^\s*\(autocmd\|au\|doautocmd\|doau\)\>+    end="$" keepend contains=@vimAutoCmdCluster
  414. syn region  vimAutoCmd        matchgroup=vimAutoSet start=+[:|]\s*\(autocmd\|au\|doautocmd\|doau\)\>+lc=1    end="$" keepend contains=@vimAutoCmdCluster
  415. syn region  vimAutoCmd        matchgroup=vimAutoSet start=+^\s*\(doautoa\|doautoall\)\>+        end="$" keepend contains=@vimAutoCmdCluster
  416. syn region  vimAutoCmd        matchgroup=vimAutoSet start=+[:|]\s*\(autocmd\|au\|doautocmd\|doau\)\>+lc=1    end="$" keepend contains=@vimAutoCmdCluster
  417.  
  418. " Echo -- prefer strings!
  419. syn region  vimEcho    oneline    start="\<\(echo\|ech\|ec\)\>"   skip="\(\\\\\)*|" end="$\||" contains=vimCommand,vimString,vimOper
  420.  
  421. " Syntax
  422. "=======
  423. syn match   vimGroupList    contained    "@\=[^ \t,]*"    contains=vimGroupSpecial,vimPatSep
  424. syn match   vimGroupList    contained    "@\=[^ \t,]*,"    nextgroup=vimGroupList contains=vimGroupSpecial,vimPatSep
  425. syn keyword vimGroupSpecial    contained    ALL    ALLBUT
  426. syn match   vimSynError    contained    "\i\+"
  427. syn match   vimSynError    contained    "\i\+="    nextgroup=vimGroupList
  428. syn match   vimSynContains    contained    "contains="    nextgroup=vimGroupList
  429. syn match   vimSynNextgroup    contained    "nextgroup="    nextgroup=vimGroupList
  430.  
  431. syn match   vimSyntax    "[:|]\s*\(syntax\|synta\|synt\|syn\|sy\)"    contains=vimCommand skipwhite nextgroup=vimSynType,vimComment
  432. syn match   vimAuSyntax    contained    "\s+\(syntax\|synta\|synt\|syn\|sy\)"    contains=vimCommand skipwhite nextgroup=vimSynType,vimComment
  433.  
  434. " Syntax: case
  435. syn keyword vimSynType        contained    case    skipwhite nextgroup=vimSynCase,vimSynCaseError
  436. syn match   vimSynCaseError    contained    "\i\+"
  437. syn keyword vimSynCase        contained    ignore    match
  438.  
  439. " Syntax: clear
  440. syn keyword vimSynType        contained    clear    skipwhite nextgroup=vimGroupList
  441.  
  442. " Syntax: cluster
  443. syn keyword vimSynType        contained    cluster        skipwhite nextgroup=vimClusterName
  444. syn region  vimClusterName    contained    matchgroup=vimGroupName start="\k\+" skip="\\\\\|\\|" end="$\||" contains=vimGroupAdd,vimGroupRem,vimSynContains,vimSynError
  445. syn match   vimGroupAdd        contained    "add="        nextgroup=vimGroupList
  446. syn match   vimGroupRem        contained    "remove="    nextgroup=vimGroupList
  447.  
  448. " Syntax: include
  449. syn keyword vimSynType        contained    include        skipwhite nextgroup=vimGroupList
  450.  
  451. " Syntax: keyword
  452. syn keyword vimSynType        contained    keyword        skipwhite nextgroup=vimSynKeyRegion
  453. syn region  vimSynKeyRegion    contained oneline matchgroup=vimGroupName start="\k\+" skip="\\\\\|\\|" end="$\||" contains=vimSynNextgroup,vimSynKeyOpt
  454. syn match   vimSynKeyOpt    contained    "\<\(contained\|transparent\|skipempty\|skipwhite\|skipnl\)\>"
  455.  
  456. " Syntax: match
  457. syn keyword vimSynType        contained    match    skipwhite nextgroup=vimSynMatchRegion
  458. syn region  vimSynMatchRegion    contained oneline keepend matchgroup=vimGroupName start="\k\+" end="$" contains=vimComment,vimSynContains,vimSynError,vimSynKeyOpt,vimSynNextgroup,vimSynRegPat
  459.  
  460. " Syntax: off
  461. syn keyword vimSynType        contained    off
  462.  
  463. " Syntax: region
  464. syn keyword vimSynType        contained    region    skipwhite nextgroup=vimSynRegion
  465. syn region  vimSynRegion    contained oneline matchgroup=vimGroupName start="\k\+" skip="\\\\\|\\|" end="$\||" contains=vimSynContains,vimSynNextgroup,vimSynRegOpt,vimSynReg,vimSynMtchGrp
  466. syn match   vimSynRegOpt    contained    "\<\(contained\|transparent\|skipempty\|skipwhite\|skipnl\|oneline\|keepend\)\>"
  467. syn match   vimSynReg        contained    "\(start\|skip\|end\)="he=e-1    nextgroup=vimSynRegPat
  468. syn match   vimSynMtchGrp    contained    "matchgroup="
  469. syn region  vimSynRegPat    contained oneline    start="!"  skip="\\\\\|\\!"  end="!"  contains=vimPatSep,vimNotPatSep,vimSynPatRange,vimSynNotPatRange nextgroup=vimSynPatMod
  470. syn region  vimSynRegPat    contained oneline    start="%"  skip="\\\\\|\\-"  end="%"  contains=vimPatSep,vimNotPatSep,vimSynPatRange,vimSynNotPatRange nextgroup=vimSynPatMod
  471. syn region  vimSynRegPat    contained oneline    start="'"  skip="\\\\\|\\'"  end="'"  contains=vimPatSep,vimNotPatSep,vimSynPatRange,vimSynNotPatRange nextgroup=vimSynPatMod
  472. syn region  vimSynRegPat    contained oneline    start="+"  skip="\\\\\|\\+"  end="+"  contains=vimPatSep,vimNotPatSep,vimSynPatRange,vimSynNotPatRange nextgroup=vimSynPatMod
  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 match   vimSynPatMod    contained    "\(hs\|ms\|me\|hs\|he\|rs\|re\)=[se]\([-+][0-9]\+\)\="
  479. syn match   vimSynPatMod    contained    "\(hs\|ms\|me\|hs\|he\|rs\|re\)=[se]\([-+][0-9]\+\)\=," nextgroup=vimSynPatMod
  480. syn match   vimSynPatMod    contained    "lc=[0-9]\+"
  481. syn match   vimSynPatMod    contained    "lc=[0-9]\+," nextgroup=vimSynPatMod
  482. syn region  vimSynPatRange    contained oneline start="\["    skip="\\\\\|\\]"   end="]"
  483. syn match   vimSynNotPatRange    contained    "\\\\\|\\\["
  484.  
  485. " Syntax: sync
  486. syn keyword vimSynType        contained    sync    skipwhite nextgroup=vimSyncC,vimSyncLines,vimSyncMatch,vimSyncError,vimSyncLinecont
  487. syn match   vimSyncError    contained    "\i\+"
  488. syn keyword vimSyncC    contained    ccomment    clear
  489. syn keyword vimSyncMatch    contained    match    skipwhite nextgroup=vimSyncGroupName
  490. syn keyword vimSyncLinecont    contained    linecont    skipwhite nextgroup=vimSynRegPat
  491. syn match   vimSyncLines    contained    "\(minlines\|maxlines\|lines\)=" nextgroup=vimNumber
  492. syn match   vimSyncGroupName    contained    "\k\+" skipwhite nextgroup=vimSyncKey
  493. syn match   vimSyncKey        contained    "\<groupthere\|grouphere\>"    skipwhite nextgroup=vimSyncGroup
  494. syn match   vimSyncGroup    contained    "\k\+" skipwhite nextgroup=vimSynRegPat,vimSyncNone
  495. syn keyword vimSyncNone        contained    NONE
  496.  
  497. " Additional IsCommand stuff, here by reasons of precedence
  498. " ====================
  499. syn match vimIsCommand    "<Bar>\s*[a-zA-Z]\+"    transparent contains=vimCommand,vimNotation
  500.  
  501. " Highlighting
  502. " ============
  503. syn match   vimHighlight    "[:|]\s*\(highlight\|highligh\|highlig\|highli\|highl\|high\|hig\|hi\)"    skipwhite nextgroup=vimHiLink,vimHiClear,vimHiKeyList,vimComment
  504. syn match   vimAuHighlight    contained    "\s+\(highlight\|highligh\|highlig\|highli\|highl\|high\|hig\|hi\)"    skipwhite nextgroup=vimHiLink,vimHiClear,vimHiKeyList,vimComment
  505.  
  506. syn match   vimHiGroup    contained    "\i\+"
  507. syn case ignore
  508. syn keyword vimHiAttrib    contained    none bold inverse italic reverse standout underline
  509. syn keyword vimFgBgAttrib    contained    none bg background fg foreground
  510. syn case match
  511. syn match   vimHiAttribList    contained    "\i\+"    contains=vimHiAttrib
  512. syn match   vimHiAttribList    contained    "\i\+,"he=e-1    contains=vimHiAttrib nextgroup=vimHiAttribList,vimHiAttrib
  513. syn case ignore
  514. syn keyword vimHiCtermColor    contained    black    darkcyan    darkred    lightcyan    lightred
  515. syn keyword vimHiCtermColor    contained    blue    darkgray    gray    lightgray    magenta
  516. syn keyword vimHiCtermColor    contained    brown    darkgreen    green    lightgreen    red
  517. syn keyword vimHiCtermColor    contained    cyan    darkgrey    grey    lightgrey    white
  518. syn keyword vimHiCtermColor    contained    darkBlue    darkmagenta    lightblue    lightmagenta    yellow
  519. syn case match
  520. syn match   vimHiFontname    contained    "[a-zA-z\-*]\+"
  521. syn match   vimHiGuiFontname    contained    "'[a-zA-z\-* ]\+'"
  522. syn match   vimHiGuiRgb    contained    "#\x\{6}"
  523. syn match   vimHiCtermError    contained    "[^0-9]\i*"
  524.  
  525. " Highlighting: hi group key=arg ...
  526. syn cluster vimHiCluster contains=vimHiGroup,vimHiTerm,vimHiCTerm,vimHiStartStop,vimHiCtermFgBg,vimHiGui,vimHiGuiFont,vimHiGuiFgBg,vimHiKeyError
  527. syn region vimHiKeyList    contained oneline start="\i\+" skip="\\\\\|\\|" end="$\||"    contains=@vimHiCluster
  528. syn match  vimHiKeyError    contained    "\i\+="he=e-1
  529. syn match  vimHiTerm    contained    "[tT][eE][rR][mM]="he=e-1            nextgroup=vimHiAttribList
  530. syn match  vimHiStartStop    contained    "\([sS][tT][aA][rR][tT]\|[sS][tT][oO][pP]\)="he=e-1    nextgroup=vimHiTermcap,vimOption
  531. syn match  vimHiCTerm    contained    "[cC][tT][eE][rR][mM]="he=e-1            nextgroup=vimHiAttribList
  532. syn match  vimHiCtermFgBg    contained    "[cC][tT][eE][rR][mM][fFbB][gG]="he=e-1        nextgroup=vimNumber,vimHiCtermColor,vimFgBgAttrib,vimHiCtermError
  533. syn match  vimHiGui    contained    "[gG][uU][iI]="he=e-1            nextgroup=vimHiAttribList
  534. syn match  vimHiGuiFont    contained    "[fF][oO][nN][tT]="he=e-1            nextgroup=vimHiFontname
  535. syn match  vimHiGuiFgBg    contained    "[gG][uU][iI][fFbB][gG]="he=e-1            nextgroup=vimHiGroup,vimHiGuiFontname,vimHiGuiRgb,vimFgBgAttrib
  536. syn match  vimHiTermcap    contained    "\S\+"        contains=vimNotation
  537.  
  538. " Highlight: clear
  539. syn keyword vimHiClear    contained    clear        nextgroup=vimHiGroup
  540.  
  541. " Highlight: link
  542. syn region vimHiLink    contained oneline matchgroup=vimCommand start="link" end="$"    contains=vimHiGroup,vimGroup
  543.  
  544. " Angle-Bracket Notation (tnx to Michael Geddes)
  545. " ======================
  546. syn case ignore
  547. 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
  548. syn match vimNotation    "<\([scam2-4]-\)\{0,4}\(right\|left\|middle\)\(mouse\|drag\|release\)>" contains=vimBracket
  549. syn match vimNotation    "<\(bslash\|space\|bar\|nop\|nul\|lt\)>"        contains=vimBracket
  550. syn match vimNotation    '<C-R>[0-9a-z"%#:.\-=]'he=e-1            contains=vimBracket
  551. syn match vimBracket contained    "[<>]"
  552. syn match vimBracket contained    "[<>]"
  553. syn case match
  554.  
  555. " Control Characters
  556. " ==================
  557. syn match vimCtrlChar    "[- -]"
  558.  
  559. " Beginners - Patterns that involve ^
  560. " =========
  561. syn match  vimLineComment    +^[ \t:]*".*$+        contains=vimTodo,vimCommentString,vimCommentTitle
  562. syn match  vimCommentTitle    "\([A-Z][a-z]*\s*\)\+:"    contained
  563. syn region vimEcho    oneline    start="^[ \t:]*\(echo\|ech\|ec\)\>" skip="\(\\\\\)*|" end="$\||" contains=vimCommand,vimString,vimOper
  564. syn match  vimBehave    "^[ \t:]*\(behave\|behav\|beha\|beh\|be\)" contains=vimCommand skipwhite nextgroup=vimBehaveModel,vimBehaveError
  565. syn match  vimConditional    "^[ \t:]*\(continue\|continu\|contin\|conti\|cont\|con\)\>"
  566. syn match  vimConditional    "^[ \t:]*\(endif\|endi\|end\|en\)\>"
  567. syn match  vimConditional    "^[ \t:]*\(endwhile\|endwhil\|endwhi\|endwh\|endw\)\>"
  568. syn match  vimConditional    "^[ \t:]*\(while\|whil\|whi\|wh\)\>"
  569. syn match  vimConditional    "^[ \t:]*\(break\|brea\)\=\>"
  570. syn match  vimConditional    "^[ \t:]*\(else\|els\|el\)\>"
  571. syn match  vimConditional    "^[ \t:]*\(elseif\|elsei\)\=\>"
  572. syn match  vimConditional    "^[ \t:]*if\>"
  573. syn match  vimSyntax    "^[ \t:]*\(syntax\|synta\|synt\|syn\|sy\)"    contains=vimCommand skipwhite nextgroup=vimSynType,vimComment
  574. syn match  vimHighlight    "^[ \t:]*\(highlight\|highligh\|highlig\|highli\|highl\|high\|hig\|hi\)"    skipwhite nextgroup=vimHiLink,vimHiClear,vimHiKeyList,vimComment
  575. syn match  vimContinue    "^\s*\\"
  576.  
  577.  
  578. " Highlighting Settings
  579. " ====================
  580. if !exists("did_vim_syntax_inits")
  581.   let did_vim_syntax_inits = 1
  582.  
  583.   " The default methods for highlighting.  Can be overridden later
  584.   hi link vimAuHighlight    vimHighlight
  585.  
  586.   hi link vimAddress    vimMark
  587.   hi link vimAutoCmdOpt    vimOption
  588.   hi link vimAutoSet    vimCommand
  589.   hi link vimBehaveError    vimError
  590.   hi link vimCommentString    vimString
  591.   hi link vimConditional    vimStatement
  592.   hi link vimErrSetting    vimError
  593.   hi link vimFgBgAttrib    vimHiAttrib
  594.   hi link vimFiletype    vimCommand
  595.   hi link vimFTError    vimError
  596.   hi link vimFilter    vimOper
  597.   hi link vimFunctionError    vimError
  598.   hi link vimGroupAdd    vimSynOption
  599.   hi link vimGroupRem    vimSynOption
  600.   hi link vimHLGroup    vimGroup
  601.   hi link vimHiAttribList    vimError
  602.   hi link vimHiCTerm    vimHiTerm
  603.   hi link vimHiCtermError    vimError
  604.   hi link vimHiCtermFgBg    vimHiTerm
  605.   hi link vimHiGroup    vimGroupName
  606.   hi link vimHiGui    vimHiTerm
  607.   hi link vimHiGuiFgBg    vimHiTerm
  608.   hi link vimHiGuiFont    vimHiTerm
  609.   hi link vimHiGuiRgb    vimNumber
  610.   hi link vimHiKeyError    vimError
  611.   hi link vimHiStartStop    vimHiTerm
  612.   hi link vimHighlight    vimCommand
  613.   hi link vimKeyCode    vimSpecFile
  614.   hi link vimKeyCodeError    vimError
  615.   hi link vimLineComment    vimComment
  616.   hi link vimNotPatSep    vimString
  617.   hi link vimPlainMark    vimMark
  618.   hi link vimPlainRegister    vimRegister
  619.   hi link vimSetString    vimString
  620.   hi link vimSpecFileMod    vimSpecFile
  621.   hi link vimStringCont    vimString
  622.   hi link vimSynCaseError    vimError
  623.   hi link vimSynContains    vimSynOption
  624.   hi link vimSynKeyOpt    vimSynOption
  625.   hi link vimSynMtchGrp    vimSynOption
  626.   hi link vimSynNextgroup    vimSynOption
  627.   hi link vimSynNotPatRange    vimSynRegPat
  628.   hi link vimSynPatRange    vimString
  629.   hi link vimSynRegOpt    vimSynOption
  630.   hi link vimSynRegPat    vimString
  631.   hi link vimSynType    vimSpecial
  632.   hi link vimSyncGroup    vimGroupName
  633.   hi link vimSyncGroupName    vimGroupName
  634.   hi link vimUserAttrb    vimSpecial
  635.   hi link vimUserAttrbCmplt    vimSpecial
  636.   hi link vimUserAttrbKey    vimOption
  637.   hi link vimUserCmd    vimCommand
  638.  
  639.   hi link vimAutoEvent    Type
  640.   hi link vimBracket    Delimiter
  641.   hi link vimCmplxRepeat    SpecialChar
  642.   hi link vimCommand    Statement
  643.   hi link vimComment    Comment
  644.   hi link vimCommentTitle    PreProc
  645.   hi link vimContinue    Special
  646.   hi link vimCtrlChar    SpecialChar
  647.   hi link vimEnvvar    PreProc
  648.   hi link vimError    Error
  649.   hi link vimFuncName    Function
  650.   hi link vimFuncVar    Identifier
  651.   hi link vimGroup    Type
  652.   hi link vimGroupSpecial    Special
  653.   hi link vimHLMod    PreProc
  654.   hi link vimHiAttrib    PreProc
  655.   hi link vimHiTerm    Type
  656.   hi link vimKeyword    Statement
  657.   hi link vimMark    Number
  658.   hi link vimNotation    Special
  659.   hi link vimNumber    Number
  660.   hi link vimOper    Operator
  661.   hi link vimOption    PreProc
  662.   hi link vimPatSep    SpecialChar
  663.   hi link vimPattern    Type
  664.   hi link vimRegister    SpecialChar
  665.   hi link vimSetSep    Statement
  666.   hi link vimSpecFile    Identifier
  667.   hi link vimSpecial    Type
  668.   hi link vimStatement    Statement
  669.   hi link vimString    String
  670.   hi link vimSubstPat    SpecialChar
  671.   hi link vimSynCase    Type
  672.   hi link vimSynCaseError    Error
  673.   hi link vimSynError    Error
  674.   hi link vimSynOption    Special
  675.   hi link vimSynReg    Type
  676.   hi link vimSyncC    Type
  677.   hi link vimSyncError    Error
  678.   hi link vimSyncKey    Type
  679.   hi link vimSyncNone    Type
  680.   hi link vimTodo    Todo
  681. endif
  682.  
  683. let b:current_syntax = "vim"
  684.  
  685. " vim: ts=17
  686.