Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 78 lines (60 sloc) 2.493 kb
451f244 first commit
Derek Wyatt authored
1 " Vim syntax file
2 " Language: wiki
3 " Maintainer: Andreas Kneib <aporia@web.de>
4 " Improved By: Mathias Panzenböck <grosser.meister.morti@gmx.at>
5 " Last Change: 2003 Aug 05
6
7 " Little syntax file to use a wiki-editor with VIM
8 " (if your browser allow this action)
9 " To use this syntax file:
10 " 1. mkdir ~/.vim/syntax
11 " 2. mv ~/wiki.vim ~/.vim/syntax/wiki.vim
12 " 3. :set syntax=wiki
13 "
14
15 " Quit if syntax file is already loaded
16 if version < 600
17 syntax clear
18 elseif exists("b:current_syntax")
19 finish
20 endif
21
22 if version < 508
23 command! -nargs=+ WikiHiLink hi link <args>
24 else
25 command! -nargs=+ WikiHiLink hi def link <args>
26 endif
27
28 syn match wikiWord "\<[A-Z][^A-Z ]\+[A-Z][^A-Z ][^A-Z ]*\>"
29 syn match wikiLine "^----$"
30 syn region wikiLink start=+\[+hs=s+1 end=+\]+he=e-1
31
32 "" This RegEx don't work very well. But I'm to clueless, to make it better. ;)
33 "syn region wikiExtLink start=+\([^\[]\|^\)\[[^\[]+hs=s+1 end=+[^\]]\]\([^\]\|$]\)+he=e-1
34 "syn region wikiLink start=+\([^\[]\|^\)\[\[[^\[]+hs=s+1 end=+[^\]]\]\]\([^\]\|$]\)+he=e-1
35
36 syn match wikiStar "[*]"
37 syn region wikiCurly start="{\{3\}" end="}\{3\}"
38 syn region wikiHead start="^= " end="[=] *"
39 syn region wikiSubhead start="^== " end="==[ ]*"
40 syn match wikiCurlyError "}"
41
42 syn region wikiBold start=+'''+ end=+'''+ contains=wikiBoldItalic
43 syn region wikiBoldItalic contained start=+\([^']\|^\)''[^']+ end=+[^']''\([^']\|$\)+
44
45 syn region wikiItalic start=+\([^']\|^\)''[^']+hs=s+1 end=+[^']''\([^']\|$\)+he=e-1 contains=wikiItalicBold
46 syn region wikiItalicBold contained start=+'''+ end=+'''+
47
48 " The default highlighting.
49 if version >= 508 || !exists("did_wiki_syn_inits")
50 if version < 508
51 let did_wiki_syn_inits = 1
52 endif
53
54 WikiHiLink wikiCurlyError Error
55 WikiHiLink wikiHead Type
56 WikiHiLink wikiSubhead PreProc
57 WikiHiLink wikiCurly Statement
58 WikiHiLink wikiStar String
59 WikiHiLink wikiExtLink Special
60 WikiHiLink wikiLink Special
61 WikiHiLink wikiLine PreProc
62 WikiHiLink wikiWord Keyword
63 hi def wikiBold term=bold cterm=bold gui=bold
64 hi def wikiBoldItalic term=bold,italic cterm=bold,italic gui=bold,italic
65 hi def wikiItalic term=italic cterm=italic gui=italic
66 hi def wikiItalicBold term=bold,italic cterm=bold,italic gui=bold,italic
67 endif
68
69 delcommand WikiHiLink
70
71 let b:current_syntax = "wiki"
72
73 "EOF vim: tw=78:ft=vim:ts=8
74
75
76
77
Something went wrong with that request. Please try again.