aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
authortemporal <temporal@630680e5-0e50-0410-840e-4b1c322b438d>2008-07-31 01:43:34 +0000
committertemporal <temporal@630680e5-0e50-0410-840e-4b1c322b438d>2008-07-31 01:43:34 +0000
commit8ccb79057ee477c36d155f2c507c859934f858dd (patch)
tree3f197fc8fa297b2c553d5862bf3ccfd140afe5f6 /editors
parent24856db0e9c6a8c5d0866fae1eee31a6fbc374b2 (diff)
downloadprotobuf-8ccb79057ee477c36d155f2c507c859934f858dd.tar.gz
protobuf-8ccb79057ee477c36d155f2c507c859934f858dd.tar.bz2
protobuf-8ccb79057ee477c36d155f2c507c859934f858dd.zip
Apply Leandro Lucarella <llucax@gmail.com>'s patches for VIM highlighting
and not setting execute bit on protoc outputs.
Diffstat (limited to 'editors')
-rw-r--r--editors/proto.vim10
1 files changed, 9 insertions, 1 deletions
diff --git a/editors/proto.vim b/editors/proto.vim
index ea010480..19c0d4c5 100644
--- a/editors/proto.vim
+++ b/editors/proto.vim
@@ -23,6 +23,9 @@
" augroup filetype
" au! BufRead,BufNewFile *.proto setfiletype proto
" augroup end
+"
+" Or just create a new file called ~/.vim/ftdetect/proto.vim with the
+" previous lines on it.
if version < 600
syntax clear
@@ -32,6 +35,9 @@ endif
syn case match
+syn keyword pbTodo contained TODO FIXME XXX
+syn cluster pbCommentGrp contains=pbTodo
+
syn keyword pbSyntax syntax import option
syn keyword pbStructure package message group
syn keyword pbRepeat optional required repeated
@@ -50,7 +56,7 @@ syn match pbInt /\<0[xX]\x+\>/
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 match pbComment /\/\/.*$/
+syn region pbComment start="//" skip="\\$" end="$" keepend contains=@pbCommentGrp
syn region pbString start=/"/ skip=/\\"/ end=/"/
syn region pbString start=/'/ skip=/\\'/ end=/'/
@@ -62,6 +68,8 @@ if version >= 508 || !exists("did_proto_syn_inits")
command -nargs=+ HiLink hi def link <args>
endif
+ HiLink pbTodo Todo
+
HiLink pbSyntax Include
HiLink pbStructure Structure
HiLink pbRepeat Repeat