将以下两个文件放置在X:XXX\Sublime Text 3x64\Data\Packages\User目录下,就可以为sublime3添加protobuf文件的语法高亮规则.

文件名: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>

Sublime Text3 protobuf syntax file(语法文件)的更多相关文章

  1. sublime text3怎么批量查找替换文件夹中的字符

    在编写代码的时候,往往有些代码是重复的,但是如果要改一处代码,其他的地方也要改.那么怎么批量修改呢?下面小编就以sublime text3为例来讲解一下sublime text3怎么批量查找替换文件夹 ...

  2. 在sublime text3下,用快捷键把文件打开到浏览器中

    使用背景 在编辑html或者js文件的时候,是否想在浏览器中预览一下, 你的步骤可能是这样的: 找到编辑文件的位置, 右键使用某一浏览器打开.如果是这样,你就out了, 因为在sublime中有更加简 ...

  3. sublime text3:sublime text3本地服务器方式运行文件

    网址:https://blog.csdn.net/md1688/article/details/70562381 1.Ctrl + Shift +P,启动Sublime Text的命令行(如果没有需要 ...

  4. 环境搭建基础知识2(sublime text3中配置verilog语法高亮)

    需求说明:Verilog设计 内容       :verilog开发环境搭建 来自       :时间的诗 1 软件下载 1.1 官方下载 地址http://www.sublimetext.com/3 ...

  5. sublime text3编译运行C,Java程序的一些配置

    环境:linux 64位 桌面环境: gnome Java编译运行 (1)Preferences --> Browse Packages --> 在该文件夹下新建build文件如: Myj ...

  6. Sublime Text3 常用快捷键动画演示及优秀插件分享

    Sublime Text 是前端的一个神器,以其精简和可DIY而让广大fans疯狂.好吧不吹了直入正题 -_-!! 首先是安装,如果你有什么软件管家的话搜一下就好,一键安装.然后,有钱的土豪就自己买个 ...

  7. java 基础(一) Sublime Text3搭建Java编译环境(Windows系统)

    1. 首先配置好Java环境变量我的jdk版本是1.8.0_191,存放目录是C:\Program Files\Java,因此添加以下环境变量 (1)系统变量→新建 JAVA_HOME 变量,变量值为 ...

  8. Sublime Text3 安装 markdownediting插件 报错 Error loading syntax file "Packages/Markdown/Markdown.tmLanguage":

    问题: Error loading syntax file "Packages/Markdown/Markdown.sublime-syntax": 解决方法: ./Data/Lo ...

  9. 如何实现Sublime Text3中vue文件高亮显示的最有效的方法

    今天第一次使用Sublime Text3软件,在实现vue文件高亮显示的过程中一直报错,经过了半天时间的不停尝试终于找到了最有效的一种解决方法!错误提示如下: 刚开始尝试了很多方法都不行,只要打开in ...

随机推荐

  1. 状态压缩 UVALive 6068 The Little Girl who Picks Mushrooms (12长春C)

    题目传送门 题意:采蘑菇.现在采了n座山,共5座山,最后要求有三个篮子的蘑菇量是1024的整数倍,丢掉后一直减1024直到不超过1024 分析:n <= 3时直接1024,否则状压枚举哪三个篮子 ...

  2. HDU3341 Lost's revenge(AC自动机+DP)

    题目是给一个DNA重新排列使其包含最多的数论基因. 考虑到内存大概就只能这么表示状态: dp[i][A][C][G][T],表示包含各碱基个数为ACGT且当前后缀状态为自动机第i的结点的字符串最多的数 ...

  3. BZOJ3787 : Gty的文艺妹子序列

    将序列分成$\sqrt{n}$块,预处理出每两块之间的逆序对数,以及ap[i]表示前i块内数字出现次数的树状数组 预处理:$O(n\sqrt{n}\log n)$ 修改时,ap[i]可以在$O(\sq ...

  4. javascript reverse string

    var strReversed = str.split('').reverse().join(''); function: function reverse(str){ return str.spli ...

  5. topcoder SRM 591 DIV2 TheArithmeticProgression

    #include <iostream> #include <cstdlib> using namespace std; class TheArithmeticProgressi ...

  6. [Cocos2d-x For WP8]Action 常用动作

    Action相当于是Cocos2d-x里面的动画操作,在Cocos2d-x里面的动画基类是CCAction类,从CCAction类派生出来的就有很多常用的动作的实现类,利用这些类就可以给我们游戏的精灵 ...

  7. 【POJ】3150 Cellular Automaton(矩阵乘法+特殊的技巧)

    http://poj.org/problem?id=3150 这题裸的矩阵很容易看出,假设d=1,n=5那么矩阵是这样的 1 1 0 0 1 1 1 1 0 0 0 1 1 1 0 0 0 1 1 1 ...

  8. Ubuntu(Linux) 下 unzip 命令使用详解

    1.功能作用:解压缩zip文件 2.位置:/usr/bin/unzip 3.格式用法:unzip [-Z] [-opts[modifiers]] file[.zip] [list] [-x xlist ...

  9. 一、saltstack简介和安装

    系统环境:CentOS6.5 准备yum源: epel源(包含了saltstack的包).阿里源(CentOS-Base.repo) Host解析文件: # cat /etc/hosts 192.16 ...

  10. 命令行安装KVM

    查看libvirtd的状态: [root@super67 ~]# /etc/init.d/libvirtd status libvirtd (pid  2503) is running... 安装vn ...