diff options
| author | bors <bors@rust-lang.org> | 2013-04-08 09:34:01 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-04-08 09:34:01 -0700 |
| commit | 2255587f230fe26a2cd0295f1c930f74f50275a6 (patch) | |
| tree | a476236ecc80e9c5a414e2efc7bf9b34ac8621bf | |
| parent | 5641777318239926363207f690bf265f7514a63c (diff) | |
| parent | fc26911b493eb151710e1a96578aad55596cfeb7 (diff) | |
| download | rust-2255587f230fe26a2cd0295f1c930f74f50275a6.tar.gz rust-2255587f230fe26a2cd0295f1c930f74f50275a6.zip | |
auto merge of #5760 : klutzy/rust/vim, r=thestinger
1. disable nested comment which is not supported now 2. add syntax highlight for rustCommentDoc e.g. `/** doc */` or `/// doc`.
| -rw-r--r-- | src/etc/vim/syntax/rust.vim | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/etc/vim/syntax/rust.vim b/src/etc/vim/syntax/rust.vim index 87f4059716b..303cc0834e8 100644 --- a/src/etc/vim/syntax/rust.vim +++ b/src/etc/vim/syntax/rust.vim @@ -110,8 +110,11 @@ syn match rustFloat display "\<[0-9][0-9_]*\.[0-9_]\+\%([eE][+-]\=[0-9 syn match rustLifetime display "\'\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" syn match rustCharacter "'\([^'\\]\|\\\(['nrt\\\"]\|x\x\{2}\|u\x\{4}\|U\x\{8}\)\)'" -syn region rustComment start="/\*" end="\*/" contains=rustComment,rustTodo -syn region rustComment start="//" skip="\\$" end="$" contains=rustTodo keepend +syn region rustCommentDoc start="/\*\*" end="\*/" +syn region rustCommentDoc start="///" skip="\\$" end="$" keepend +syn match rustComment "/\*\*/" +syn region rustComment start="/\*\([^\*]\|$\)" end="\*/" contains=rustTodo +syn region rustComment start="//\([^/]\|$\)" skip="\\$" end="$" contains=rustTodo keepend syn keyword rustTodo contained TODO FIXME XXX NB @@ -134,6 +137,7 @@ hi def link rustConditional Conditional hi def link rustIdentifier Identifier hi def link rustModPath Include hi def link rustFuncName Function +hi def link rustCommentDoc SpecialComment hi def link rustComment Comment hi def link rustMacro Macro hi def link rustType Type |
