2 " You will have to restart vim for this to take effect. In any case
3 " it is a good idea to read ":he new-filetype" so that you know what
4 " is going on, and why the above lines work.
6 " Written originally by Dominic Mitchell, Jan 2006.
9 " Modified by Aaron Bieber, May 2007.
10 " blog.aaronbieber.com
12 " Modified by Tim Harper, July 2008 - current
13 " tim.theenchanter.com
18 elseif exists("b:current_syntax")
22 " Textile commands like "h1" are case sensitive, AFAIK.
25 " Textile syntax: <http://textism.com/tools/textile/>
28 syn match txtEmphasis /_[^_]\+_/
29 syn match txtBold /\*[^*]\+\*/
30 syn match txtCite /??.\+??/
31 syn match txtDeleted /-[^-]\+-/
32 syn match txtInserted /+[^+]\++/
33 syn match txtSuper /\^[^^]\+\^/
34 syn match txtSub /\~[^~]\+\~/
35 syn match txtSpan /%[^%]\+%/
36 syn match txtFootnoteRef /\[[0-9]\+]/
37 syn match txtCode /@[^@]\+@/
40 syn match txtHeader /^h1\. .\+/
41 syn match txtHeader2 /^h2\. .\+/
42 syn match txtHeader3 /^h[3-6]\..\+/
43 syn match txtBlockquote /^bq\./
44 syn match txtFootnoteDef /^fn[0-9]\+\./
45 syn match txtListBullet /\v^\*+ /
46 syn match txtListBullet2 /\v^(\*\*)+ /
47 syn match txtListNumber /\v^#+ /
48 syn match txtListNumber2 /\v^(##)+ /
50 syn cluster txtBlockElement contains=txtHeader,txtBlockElement,txtFootnoteDef,txtListBullet,txtListNumber
53 " Everything after the first colon is from RFC 2396, with extra
54 " backslashes to keep vim happy... Original:
55 " ^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?
57 " Revised the pattern to exclude spaces from the URL portion of the
58 " pattern. Aaron Bieber, 2007.
59 syn match txtLink /"[^"]\+":\(\([^:\/?# ]\+\):\)\?\(\/\/\([^\/?# ]*\)\)\?\([^?# ]*\)\(?\([^# ]*\)\)\?\(#\([^ ]*\)\)\?/
61 syn cluster txtInlineElement contains=txtEmphasis,txtBold,txtCite,txtDeleted,txtInserted,txtSuper,txtSub,txtSpan
63 if version >= 508 || !exists("did_txt_syn_inits")
65 let did_txt_syn_inits = 1
66 command -nargs=+ HiLink hi link <args>
68 command -nargs=+ HiLink hi def link <args>
71 HiLink txtHeader Title
72 HiLink txtHeader2 Question
73 HiLink txtHeader3 Statement
74 HiLink txtBlockquote Comment
75 HiLink txtListBullet Operator
76 HiLink txtListBullet2 Constant
77 HiLink txtListNumber Operator
78 HiLink txtListNumber2 Constant
80 HiLink txtCode Identifier
81 hi def txtEmphasis term=underline cterm=underline gui=italic
82 hi def txtBold term=bold cterm=bold gui=bold
87 " vim: set ai et sw=4 :