就这么看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. Flutter实战视频-移动电商-41.详细页_数据接口的调试

    41.详细页_数据接口的调试 建立数据模型层,我们的业务逻辑分开,然后进行后台数据的调试 生成model类 json数据: { ", "message": "s ...

  2. 为Docker容器设置静态IP

    此文已由作者袁欢授权网易云社区发布. 欢迎访问网易云社区,了解更多网易技术产品运营经验. 创建docker容器 docker run -it --name=yh -h yh --net=none de ...

  3. iCarousel的简单介绍及应用

    iOS开源类iCarousel介绍 iCarousel是一个类,它继承于UIView,用于简化实现各种类型的旋转木马(分页滚动视图)iPhone.iPad和Mac OS.iCarousel实现一些常见 ...

  4. POJ1182【种类并查集】

    思路: ---来源百度 0表示它与根结点为同类, 1表示它吃根结点, 2表示它被根结点吃. 判断两个点a, b的关系,我们令p = Find(a), q = Find(b),即p, q分别为a, b子 ...

  5. IT兄弟连 JavaWeb教程 JSP静态包含和动态包含的区别

    JSP静态包含(<%@ include>和JSP动态包含<jsp:include>同样都可以用来包含文件,但是他们之间是存在很大差别的.下面将对include指令与includ ...

  6. nginx 一些配置

    worker_processes 4; #工作进程数 events { #epoll是多路复用IO(I/O Multiplexing)中的一种方式, #仅用于linux2.6以上内核,可以大大提高ng ...

  7. 洛谷1072(gcd的运用)

    已知正整数a0,a1,b0,b1,设某未知正整数x满足: 1. x 和 a0 的最大公约数是 a1​: 2. x 和 b0​ 的最小公倍数是b1. Hankson 的“逆问题”就是求出满足条件的正整数 ...

  8. JAVA常用知识总结(十二)——数据库(二)

    MySQL主从热备份工作原理 简单的说:就是主服务器上执行过的sql语句会保存在binLog里面,别的从服务器把他同步过来,然后重复执行一遍,那么它们就能一直同步啦. 整体上来说,复制有3个步骤: 作 ...

  9. 剑指 Offer

    3.1 找出数组中重复的数 来源:AcWing 题目描述 给定一个长度为 n 的整数数组 nums,数组中所有的数字都在 0∼n−1 的范围内. 数组中某些数字是重复的,但不知道有几个数字重复了,也不 ...

  10. 理解C#系列 / 前言

    前言 索引 写什么? 为什么写? 怎么写? 写什么? 写和C#编程相关的知识. 写知识的定义,附加对知识的理解. 写知识的作用,使用的场景,使用的条件. 写知识的本质,技术的结构,工作的原理. 写知识 ...