dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

map.vim (628B)


      1 " Quit when a (custom) syntax file was already loaded
      2 if exists("b:current_syntax")
      3   finish
      4 endif
      5 
      6 let s:cpo_save = &cpo
      7 set cpo&vim
      8 
      9 " Clear the syntax
     10 syntax clear
     11 
     12 " Define highlighting groups
     13 syntax region mapComment start="^#" end="$"
     14 syntax match mapDash "\(^ *\)\@<=-\+"
     15 syntax match mapSource "[a-zA-Z0-9_\-./]\+:"
     16 syntax match mapDest "\(: \)\@<=.\+" "have to use lookbehind here, \zs breaks it
     17 
     18 " Perform the actual highlighting
     19 hi def link mapComment Comment
     20 hi def link mapSource Statement
     21 hi def link mapDash Function
     22 hi def link mapDest String
     23 
     24 let b:current_syntax = "map"
     25 let &cpo = s:cpo_save
     26 unlet s:cpo_save