就这么看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. C#基础:使用Thread创建线程

    Thread类可以创建和控制线程,Thread类的构造函数重载为接受ThreadStart和ParameterizedThreadStart类型的委托参数.下面我们用一个例子来解释怎样用Thread类 ...

  2. LeetCode:104 Maximum Depth of Binary Tree(easy)

    题目: Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the ...

  3. throw UnsupportedOperationException

    package org.usc.action; import java.util.ArrayList; import java.util.Arrays; import java.util.List; ...

  4. Lightoj 1147【DP】

    题意: 把n个人分成两部分,要你怎么分使得两部分尽可能相等: 思路: 如果我们把一部分人的重量达到离sum/2最近,那就一定行啊 其实就是一条棒,两种不同的棒去拼接成一条棒,然后最好就是离mid最近, ...

  5. bzoj 3996: [TJOI2015]线性代数【最小割】

    把转置矩阵看成逆矩阵吓傻了233 首先按照矩乘推一下式子: \[ D=\sum_{i=1}^n a[i]*(\sum_{j=1}^n a[j]*b[j][i])-c[i] \] \[ D=(\sum_ ...

  6. Codevs 1141 数列

    1141 数列 题目描述 Description 给定一个正整数k(3≤k≤15),把所有k的方幂及所有有限个互不相等的k的方幂之和构成一个递增的序列,例如,当k=3时,这个序列是: 1,3,4,9, ...

  7. Metabolic Signatures of Cystic Fibrosis Identified in Dried Blood Spots For Newborn Screening Without Carrier Identification (文献分享一组-孔楠楠)

    题目:Metabolic Signatures of Cystic Fibrosis Identified in Dried Blood Spots For Newborn Screening Wit ...

  8. Cocoapods在OS X Yosemite上报错的解决方法

    今天升级了Mac OS X 10.10-Yosemite以后运行pod install遇到下面的错误: /System/Library/Frameworks/Ruby.framework/Versio ...

  9. MySQL - 执行sql报错USING BTREE

    问题与分析 在执行sql文件时发现报错如下: You have an error in your SQL syntax; check the manual that corresponds to yo ...

  10. c# 参数传递问题(形参与实参)

    形参是指被调用方法中的参数 实参是指传递给方法的参数 (1)值类型传参是按值传递 值类型传参,形参接受到的是实参的一个副本,即形参发生变化,实参不会发生任何变化 (2)引用类型参数按值传递 当参数传递 ...