editors

changeset 30:8062135a19d3

Vim mode now highlights EuDoc comments: Headings, Sections, Bold, Italic, Code and Links
author Jeremy Cowgar <jeremy@cowgar.com>
date Thu Nov 11 14:54:30 2010 -0500 (2010-11-11)
parents 3b58700d3c79
children 2479d630c1e3
files vim/syntax/euphoria.vim
line diff
     1.1 --- a/vim/syntax/euphoria.vim	Thu Nov 11 13:53:24 2010 -0500
     1.2 +++ b/vim/syntax/euphoria.vim	Thu Nov 11 14:54:30 2010 -0500
     1.3 @@ -108,8 +108,18 @@
     1.4  " Todo (only highlighted in comments)
     1.5  syn keyword euphoriaTodo contained	TODO FIXME XXX BUG NOTE
     1.6  
     1.7 -syn region euphoriaComment start="/\*" end="\*/" contains=euphoriaTodo,@Spell
     1.8 -syn region euphoriaComment oneline contains=euphoriaTodo start="--" end="$"
     1.9 +" Basic Creole/EuDOC markup
    1.10 +syn region eudocHead    contained oneline start="^[-* \t]*="      end="$"
    1.11 +syn region eudocLink    contained oneline start=+\[\[+hs=s+2      end=+\]\]+he=e-2
    1.12 +syn region eudocBold    contained oneline start="[^\*]\*\*[^\* ]" end="\*\*"
    1.13 +syn region eudocItalic  contained oneline start="[^:]\/\/"hs=s+1  end="[^:]\/\/"
    1.14 +syn region eudocCode    contained oneline start="##"              end="##"
    1.15 +syn region eudocHeading contained oneline start="^[-* \t]*[A-Z]"  end="\:$"
    1.16 +
    1.17 +syn cluster eudoc contains=eudocHead,eudocLink,eudocBold,eudocItalic,eudocCode,eudocHeading
    1.18 +
    1.19 +syn region euphoriaComment start="/\*" end="\*/" contains=euphoriaTodo,@eudoc,@Spell
    1.20 +syn region euphoriaComment oneline contains=euphoriaTodo,@eudoc,@Spell start="--" end="$"
    1.21  syn sync ccomment euphoriaComment
    1.22  
    1.23  " Define the default highlighting.
    1.24 @@ -128,6 +138,12 @@
    1.25  	hi def link euphoriaCharacter       Character
    1.26  	hi def link euphoriaOperator        Operator
    1.27  	hi def link euphoriaTodo            ToDo
    1.28 +    hi def link eudocHead               Statement
    1.29 +    hi def link eudocCode               Number
    1.30 +    hi def link eudocLink               String
    1.31 +    hi def eudocBold                    term=bold cterm=bold gui=bold
    1.32 +    hi def eudocItalic                  term=italic cterm=italic gui=italic
    1.33 +    hi def eudocHeading                 term=underline cterm=underline gui=underline
    1.34  endif
    1.35  
    1.36  let b:current_syntax = "euphoria"

SCM Home | OpenEuphoria.org Home