Sublime Text3 protobuf syntax file(语法文件)
2016-05-11 09:49
591 查看
将以下两个文件放置在X:XXX\Sublime Text 3x64\Data\Packages\User目录下,就可以为sublime3添加protobuf文件的语法高亮规则.
文件名:Protobuf.JSON-tmLanguage
文件内容:
文件名:Protobuf.tmLanguage
文件内容:
文件名:Protobuf.JSON-tmLanguage
文件内容:
{ "name": "ProtoBuf", "scopeName": "source.proto", "fileTypes": ["proto"], "foldingStartMarker": "{", "foldingStopMarker": "}", "patterns": [ { "match": "\\s+[0-9]*", "name": "constant.numeric.proto", "comment": "Field numbers" }, { "match": "double|float|int32|int64|uint32|uint64|sint32|sint64|long|fixed32|fixed64|sfixed|sfixed64|bool|string|bytes", "name": "storage.type.source.proto", "comment": "Scalar Value types." }, { "match": "optional|required|repeated|default", "name": "storage.modifier.source.proto", "comment": "Field Rules" }, { "match": "^message|^package|^option|^import|^extend|^service", "name": "entity.name.function.proto", "comment": "Message section" }, { "match": "\/\/.*", "name": "comment.line.double-slash.proto", "comment": "Comments" } ], "uuid": "7c5e8e41-b1b7-40e2-a140-9c0c667e1ad7" }
文件名:Protobuf.tmLanguage
文件内容:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>fileTypes</key> <array> <string>proto</string> </array> <key>foldingStartMarker</key> <string>{</string> <key>foldingStopMarker</key> <string>}</string> <key>name</key> <string>ProtoBuf</string> <key>patterns</key> <array> <dict> <key>comment</key> <string>Field numbers</string> <key>match</key> <string>\s+[0-9]*</string> <key>name</key> <string>constant.numeric.proto</string> </dict> <dict> <key>comment</key> <string>Scalar Value types.</string> <key>match</key> <string>double|float|int32|int64|uint32|uint64|sint32|sint64|long|fixed32|fixed64|sfixed|sfixed64|bool|string|bytes</string> <key>name</key> <string>storage.type.source.proto</string> </dict> <dict> <key>comment</key> <string>Field Rules</string> <key>match</key> <string>optional|required|repeated|default</string> <key>name</key> <string>storage.modifier.source.proto</string> </dict> <dict> <key>comment</key> <string>Message section</string> <key>match</key> <string>^message|^package|^option|^import|^extend|^service</string> <key>name</key> <string>entity.name.function.proto</string> </dict> <dict> <key>comment</key> <string>Comments</string> <key>match</key> <string>//.*</string> <key>name</key> <string>comment.line.double-slash.proto</string> </dict> </array> <key>scopeName</key> <string>source.proto</string> <key>uuid</key> <string>7c5e8e41-b1b7-40e2-a140-9c0c667e1ad7</string> </dict> </plist>
相关文章推荐
- linux命令
- weblogic JVM初始化配置
- java 方法可变参数
- 飞机遭遇时空乱流离奇穿越到30年前
- Matlab文件操作及读txt文件
- 兔子来了
- 理解 Objective-C Runtime
- Hadoop2源码分析-HDFS datanode核心模块分析
- HTTP 状态码
- Java 冒泡排序
- 大话设计模式java版--建造者模式
- Android内存优化之OOM
- iOS开发 - 音频相关
- 门面模式/外观模式
- Android 内功心法(1.5)——android常用设计模式之命令模式
- 打印
- 使用自带 cluster-reuters.sh 聚类使用
- 自定义 Date类型转换是报
- log4j 打印sql,按日期生成文件,生成文件位置
- stm32——RTC实时时钟