Mercurial > hg > RemoteEditor > vim7
comparison runtime/syntax/doxygen.vim @ 34:e170173ecb68 current-release
before ack base protocol.
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 26 Nov 2008 15:02:10 +0900 |
parents | 76efa0be13f1 |
children | c16898406ff2 |
comparison
equal
deleted
inserted
replaced
33:7d0d8b831f5a | 34:e170173ecb68 |
---|---|
1 " DoxyGen syntax hilighting extension for c/c++/idl/java | 1 " DoxyGen syntax hilighting extension for c/c++/idl/java |
2 " Language: doxygen on top of c, cpp, idl, java | 2 " Language: doxygen on top of c, cpp, idl, java, php |
3 " Maintainer: Michael Geddes <vimmer@frog.wheelycreek.net> | 3 " Maintainer: Michael Geddes <vimmer@frog.wheelycreek.net> |
4 " Author: Michael Geddes | 4 " Author: Michael Geddes |
5 " Last Change: April 2007 | 5 " Last Change: July 2008 |
6 " Version: 1.20 | 6 " Version: 1.22 |
7 " | 7 " |
8 " Copyright 2004-2006 Michael Geddes | 8 " Copyright 2004-2008 Michael Geddes |
9 " Please feel free to use, modify & distribute all or part of this script, | 9 " Please feel free to use, modify & distribute all or part of this script, |
10 " providing this copyright message remains. | 10 " providing this copyright message remains. |
11 " I would appreciate being acknowledged in any derived scripts, and would | 11 " I would appreciate being acknowledged in any derived scripts, and would |
12 " appreciate and welcome any updates, modifications or suggestions. | 12 " appreciate and welcome any updates, modifications or suggestions. |
13 | 13 |
28 " The variable g:doxygen_codeword_font can be set to the guifont for marking \c | 28 " The variable g:doxygen_codeword_font can be set to the guifont for marking \c |
29 " words - a 'typewriter' like font normally. Spaces must be escaped. It can | 29 " words - a 'typewriter' like font normally. Spaces must be escaped. It can |
30 " also be set to any highlight attribute. Alternatively, a highlight for doxygenCodeWord | 30 " also be set to any highlight attribute. Alternatively, a highlight for doxygenCodeWord |
31 " can be used to override it. | 31 " can be used to override it. |
32 " | 32 " |
33 " By default, highlighting is done assumng you have the JAVADOC_AUTOBRIEF | 33 " By default, highlighting is done assuming you have the JAVADOC_AUTOBRIEF |
34 " setting turned on in your Doxygen configuration. If you don't, you | 34 " setting turned on in your Doxygen configuration. If you don't, you |
35 " can set the variable g:doxygen_javadoc_autobrief to 0 to have the | 35 " can set the variable g:doxygen_javadoc_autobrief to 0 to have the |
36 " highlighting more accurately reflect the way Doxygen will interpret your | 36 " highlighting more accurately reflect the way Doxygen will interpret your |
37 " comments. | 37 " comments. |
38 " | 38 " |
39 " Support for cpp, c, idl, doxygen and php. | |
40 " | |
39 " Special thanks to: Wu Yongwei, Toby Allsopp | 41 " Special thanks to: Wu Yongwei, Toby Allsopp |
40 " | 42 " |
41 | 43 |
42 if exists('b:suppress_doxygen') | 44 if exists('b:suppress_doxygen') |
43 unlet b:suppress_doxygen | 45 unlet b:suppress_doxygen |
54 | 56 |
55 " Start of Doxygen syntax hilighting: | 57 " Start of Doxygen syntax hilighting: |
56 " | 58 " |
57 | 59 |
58 " C/C++ Style line comments | 60 " C/C++ Style line comments |
59 syn region doxygenComment start=+/\*\(\*/\)\@![*!]+ end=+\*/+ contains=doxygenSyncStart,doxygenStart,doxygenTODO keepend fold | 61 syn region doxygenComment start=+/\*\(\*/\)\@![*!]+ end=+\*/+ contains=doxygenSyncStart,doxygenStart,doxygenTODO keepend fold containedin=phpRegion |
60 syn region doxygenCommentL start=+//[/!]<\@!+me=e-1 end=+$+ contains=doxygenStartL keepend skipwhite skipnl nextgroup=doxygenComment2 fold | 62 syn region doxygenCommentL start=+//[/!]<\@!+me=e-1 end=+$+ contains=doxygenStartL,@Spell keepend skipwhite skipnl nextgroup=doxygenComment2 fold containedin=phpRegion |
61 syn region doxygenCommentL start=+//[/!]<+me=e-2 end=+$+ contains=doxygenStartL keepend skipwhite skipnl fold | 63 syn region doxygenCommentL start=+//[/!]<+me=e-2 end=+$+ contains=doxygenStartL,@Spell keepend skipwhite skipnl fold containedin=phpRegion |
62 syn region doxygenCommentL start=+//@\ze[{}]+ end=+$+ contains=doxygenGroupDefine,doxygenGroupDefineSpecial fold | 64 syn region doxygenCommentL start=+//@\ze[{}]+ end=+$+ contains=doxygenGroupDefine,doxygenGroupDefineSpecial,@Spell fold containedin=phpRegion |
63 | 65 |
64 " Single line brief followed by multiline comment. | 66 " Single line brief followed by multiline comment. |
65 syn region doxygenComment2 start=+/\*\(\*/\)\@![*!]+ end=+\*/+ contained contains=doxygenSyncStart2,doxygenStart2,doxygenTODO keepend fold | 67 syn region doxygenComment2 start=+/\*\(\*/\)\@![*!]+ end=+\*/+ contained contains=doxygenSyncStart2,doxygenStart2,doxygenTODO keepend fold |
66 " This helps with sync-ing as for some reason, syncing behaves differently to a normal region, and the start pattern does not get matched. | 68 " This helps with sync-ing as for some reason, syncing behaves differently to a normal region, and the start pattern does not get matched. |
67 syn match doxygenSyncStart2 +[^*/]+ contained nextgroup=doxygenBody,doxygenPrev,doxygenStartSpecial,doxygenSkipComment,doxygenStartSkip2 skipwhite skipnl | 69 syn match doxygenSyncStart2 +[^*/]+ contained nextgroup=doxygenBody,doxygenPrev,doxygenStartSpecial,doxygenSkipComment,doxygenStartSkip2 skipwhite skipnl |
96 endif | 98 endif |
97 | 99 |
98 " This helps with sync-ing as for some reason, syncing behaves differently to a normal region, and the start pattern does not get matched. | 100 " This helps with sync-ing as for some reason, syncing behaves differently to a normal region, and the start pattern does not get matched. |
99 syn match doxygenSyncStart +\ze[^*/]+ contained nextgroup=doxygenBrief,doxygenPrev,doxygenStartSpecial,doxygenFindBriefSpecial,doxygenStartSkip,doxygenPage skipwhite skipnl | 101 syn match doxygenSyncStart +\ze[^*/]+ contained nextgroup=doxygenBrief,doxygenPrev,doxygenStartSpecial,doxygenFindBriefSpecial,doxygenStartSkip,doxygenPage skipwhite skipnl |
100 | 102 |
101 syn region doxygenBriefLine contained start=+\<\k+ end=+\(\n\s*\*\=\s*\([@\\]\([npcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\@!\)\|\s*$\)\@=+ contains=doxygenContinueComment,doxygenFindBriefSpecial,doxygenSmallSpecial,@doxygenHtmlGroup,doxygenTODO,doxygenHyperLink,doxygenHashLink skipwhite keepend | 103 syn region doxygenBriefLine contained start=+\<\k+ end=+\(\n\s*\*\=\s*\([@\\]\([npcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\@!\)\|\s*$\)\@=+ contains=doxygenContinueComment,doxygenFindBriefSpecial,doxygenSmallSpecial,@doxygenHtmlGroup,doxygenTODO,doxygenHyperLink,doxygenHashLink,@Spell skipwhite keepend |
102 | 104 |
103 " Match a '<' for applying a comment to the previous element. | 105 " Match a '<' for applying a comment to the previous element. |
104 syn match doxygenPrev +<+ contained nextgroup=doxygenBrief,doxygenBody,doxygenSpecial,doxygenStartSkip skipwhite | 106 syn match doxygenPrev +<+ contained nextgroup=doxygenBrief,doxygenBody,doxygenSpecial,doxygenStartSkip skipwhite |
105 | 107 |
106 if exists("c_comment_strings") | 108 if exists("c_comment_strings") |