瀏覽代碼

Support for C-style comments in editors/proto.vim -- patch from infnty.

liujisi@google.com 14 年之前
父節點
當前提交
5325de1808
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      editors/proto.vim

+ 1 - 2
editors/proto.vim

@@ -69,8 +69,7 @@ syn keyword pbBool      true false
 syn match   pbInt     /-\?\<\d\+\>/
 syn match   pbInt     /-\?\<\d\+\>/
 syn match   pbInt     /\<0[xX]\x+\>/
 syn match   pbInt     /\<0[xX]\x+\>/
 syn match   pbFloat   /\<-\?\d*\(\.\d*\)\?/
 syn match   pbFloat   /\<-\?\d*\(\.\d*\)\?/
-" TODO: .proto also supports C-style block comments;
-" see /usr/share/vim/vim70/syntax/c.vim for how it's done.
+syn region  pbComment start="\/\*" end="\*\/" contains=@pbCommentGrp
 syn region  pbComment start="//" skip="\\$" end="$" keepend contains=@pbCommentGrp
 syn region  pbComment start="//" skip="\\$" end="$" keepend contains=@pbCommentGrp
 syn region  pbString  start=/"/ skip=/\\"/ end=/"/
 syn region  pbString  start=/"/ skip=/\\"/ end=/"/
 syn region  pbString  start=/'/ skip=/\\'/ end=/'/
 syn region  pbString  start=/'/ skip=/\\'/ end=/'/