就这么看json等配置文件,太难了,我们需要括号匹配插件BracketHighlighter,但是装完以后只有下划线提示不明显,需要配置

 

 

Bracket Settings-Default 文件不能修改,只能修改Bracket Settings-User,复制以下设置:

"bracket_styles": {

// "default" and "unmatched" styles are special

// styles. If they are not defined here,

// they will be generated internally with

// internal defaults.

 

// "default" style defines attributes that

// will be used for any style that does not

// explicitly define that attribute. So if

// a style does not define a color, it will

// use the color from the "default" style.

"default": {

"icon": "dot",

// BH1's original default color for reference

//"color": "entity.name.class",

"color": "brackethighlighter.default",

"style": "highlight"

},

 

// This particular style is used to highlight

// unmatched bracket pairs. It is a special

// style.

"unmatched": {

"icon": "question",

"color": "brackethighlighter.unmatched",

"style": "highlight"

},

 

"curly": {

"icon": "curly_bracket",

"color": "brackethighlighter.curly",

"style": "highlight"

},

"round": {

"icon": "round_bracket",

"color": "brackethighlighter.round",

"style": "highlight"

},

"square": {

"icon": "square_bracket",

"color": "brackethighlighter.square",

"style": "highlight"

},

"angle": {

"icon": "angle_bracket",

"color": "brackethighlighter.angle",

"style": "highlight"

},

"tag": {

"icon": "tag",

"color": "brackethighlighter.tag",

"style": "highlight"

},

"c_define": {

"icon": "hash",

"color": "brackethighlighter.c_define",

"style": "highlight"

},

"single_quote": {

"icon": "single_quote",

"color": "brackethighlighter.quote",

"style": "highlight"

},

"double_quote": {

"icon": "double_quote",

"color": "brackethighlighter.quote",

"style": "highlight"

},

"regex": {

"icon": "regex",

"color": "brackethighlighter.quote",

"style": "highlight"

}

}

 

设置好了以后,就是白色的高亮提示,并不好看,并不直观,我要设置的是代码包围效果

就像这样的效果

设置

"high_visibility_enabled_by_default": true,

"high_visibility_style": "outline"

 

但是这样的框框是白色的不是蓝色的,要设置成蓝色的,看官方文档

 

https://facelessuser.github.io/BracketHighlighter/customize/#configuring-highlight-style

 

high_visibility_color

Modifies the high visibility color. There are three types of settings you can use:

  • __default__ is a special reserved value which will use the color set in bracket_styles. SeeConfiguring Highlight Style for more info.
  • __bracket__ is a special reserved value which will inherit the defined color of the highlighted bracket.
  • Any valid scope found in your color scheme.

// Color for high visibility mode

"high_visibility_color":
"__bracket__",

 

There are two special style definitions whose names are reserved: default and unmatched, but you can configure them.

 

Add this to your color scheme:

<dict>

<key>name</key>

<string>Bracket Curly</string>

<key>scope</key>

<string>brackethighlighter.curly</string>

<key>settings</key>

<dict>

<key>foreground</key>

<string>#CC99CC</string>

</dict>

</dict>

And then use the scope:

"curly": {

"icon": "curly_bracket"

"color": "brackethighlighter.curly",

// "style": "underline"

},

所以如果把"high_visibility_color": "__default__",设为default ,它就会用

我在color scheme里brackethighlighter.default定义的值

<dict>

<key>name</key>

<string>Bracket Default</string>

<key>scope</key>

<string>brackethighlighter.default</string>

用这个值

 

但是我怎么能打开传说中的color scheme . tmTheme 文件?搜索也搜不到只有.tmTheme.cache文件,ST3里的文件都被压缩了起来,可以直接从压缩包运行,想要看可以安装 PackageResourceViewer 插件

网页
https://github.com/skuroda/PackageResourceViewer

 

装好以后,open-resource

 

 

找到color Scheme-Default

 

找到自己的Theme

 

在</ array >上面加上

<dict>

<key>name</key>

<string>Bracket Default</string>

<key>scope</key>

<string>brackethighlighter.default</string>

<key>settings</key>

<dict>

<key>foreground</key>

<string>#6495ED</string>

</dict>

</dict>

 

就有了蓝色代码包围效果

更多颜色设置见

http://www.tuicool.com/articles/EV3eEzA

 

效果如下:

 

 

解决问题五大法宝

  1. 谷歌
  2. 百度
  3. 官方文档
  4. 官方论坛
  5. stackOverflow

Sublime Text3括号配对与代码包围效果BracketHighlighter的更多相关文章

  1. Sublime Text3—Code Snippets(自定义代码片段)

    摘要 程序员总是会不断的重复写一些简单的代码片段,为了提高编码效率,我们可以把经常用到的代码保存起来再调用. 平时用sublime安装各种插件,使用Tab键快速补全,便是snippets(可译为代码片 ...

  2. sublime text3 之snippet编写代码片段

    sublime text 3 中有个强大的功能就是可以编写各种文件类型的snippet代码片段,可以节省大量的时间. 文件名为:jekyll-top.sublime-snippet(.sublime- ...

  3. 在Sublime Text3中运行PHP代码

    一.前言 最近由于工作需要要与第三方系统对接,另外由于文档中关于其中几个接口就只有很简单的描述,弄了半天都没有弄成功.跟第三方负责的人沟通后还是没有找到具体问题出在哪里,另外因为他们没有开发人员懂.n ...

  4. sublime text3 设置快速生成代码

    依次打开 Tools > Developer(开发者选项) > new Snippet(新的代码块).可以看到注释的说明: <snippet> <content>& ...

  5. sublime Text3 如何自动排版代码

    安装 html beautiful 然后按ctrl+shift+alt+f

  6. Ubuntu16.04下使用sublime text3搭建Python IDE

    本来是想用pycharm,但你看它的内存要求,我的虚拟机一共也就1G Vim太别扭了,就算有代码颜色,不能自动对齐,不能规范格式,跳转到函数定义,显示文档,要配置起来太费劲,所以就尝试着用sublim ...

  7. Sublime Text3 代码编辑器使用笔记

    Sublime Text3 作为一款代码的文本编辑器,有许多插件,这一点是我认为 Sublime Text3 很强大的原因之一.插件的安装可以参考下面的文章. Sublime Text3 插件安装教程 ...

  8. Sublime Text3介绍和插件安装——基于Python开发

    Subime编辑器是一款轻量级的代码编辑器,是收费的,但是可以无限期使用.官网下载地址:https://www.sublimetext.com. Sublime Text3支持语言开发种类多样,几乎可 ...

  9. sublime text3配置插件

    之前一直习惯用记事本写代码,懒得用IDE,虽然知道用 IDE效率高一些,不过觉得还是用记事本纯手写代码,比较容易记忆.直到昨天写代码遇到了点问题,截图给师兄看,师兄就问我是不是用记事本写代码,为什么不 ...

随机推荐

  1. codevs-1203

    1203 判断浮点数是否相等 题目描述 Description 给出两个浮点数,请你判断这两个浮点数是否相等   输入描述 Input Description 输入仅一行,包含两个浮点数   输出描述 ...

  2. httpclient:Ip 代理

    参考:http://blog.csdn.net/sdfiiiiii/article/details/70432060  http://blog.csdn.net/qy20115549/article/ ...

  3. 【网络爬虫】【java】微博爬虫(二):如何抓取HTML页面及HttpClient使用

    一.写在前面 上篇文章以网易微博爬虫为例,给出了一个很简单的微博爬虫的爬取过程,大概说明了网络爬虫其实也就这么回事,或许初次看到这个例子觉得有些复杂,不过没有关系,上篇文章给的例子只是让大家对爬虫过程 ...

  4. Flutter实战视频-移动电商-09.首页_项目结构建立和获取数据

    09.首页_项目结构建立和获取数据 在config下创建service_url.dart 用来配置我们后端接口的配置文件 一个变量存 接口地址,一个接口方法地址 所有后天请求数据的方法都放在这个文件夹 ...

  5. Flutter实战视频-移动电商-63.购物车_详细页显示购物车商品数量

    63.购物车_详细页显示购物车商品数量 购物车的图标嵌套在statck组件里面 外层套了一个stack组件 数量我们需要用Provide 返回一个container来做样式 气泡效果,中间是个数字外面 ...

  6. jquery中innerheight outerHeight()与height()的区别

    1. .height() 获取匹配元素集合中的第一个元素的当前计算高度值 或 设置每一个匹配元素的高度值(带一个参数). 注意:1).css('height')和.height()之间的区别是后者返回 ...

  7. 658. Find K Closest Elements

    Given a sorted array, two integers k and x, find the k closest elements to x in the array. The resul ...

  8. Beatcoder#39+#41+#42

    HDU5211 思路: 倒着更新每个数的约数,更新完要把自己加上,以及1的情况? //#include <bits/stdc++.h> #include<iostream> # ...

  9. TFS 无法找到新加的Windows用户

    Windows 用户加入后,无法在TFS中的"浏览"中找到(只有已经加入TFS的Windows用户显示出来) 其实这时候只要直接输入 用户名 然后点击"保存更改" ...

  10. Python的一些技巧

    a = [32, 37, 28, 30, 37, 25, 27, 24, 35, 55, 23, 31, 55, 21, 40, 18, 50, 35, 41, 49, 37, 19, 40, 41, ...