Paréntesis de arco iris de texto sublime

So, vim users have https://github.com/kien/rainbow_parentheses.vim

Emacs users have http://www.emacswiki.org/emacs/RainbowDelimiters

Is there something similar for users of Sublime Text (2 or 3?)

I already have bracket highlighter, which lets me highlight the innermost brackets, but I edit a lot of complex SQL in sublime text 3, and sometimes lose track of my parentheses. Can you edit the configuration files for this to match the behavior of the others?

Bracketeer allows you to perform operations on brackets, but I'd like to just see them in colors.

As requested, some example sql:

Select
  name,
  sum(cost) as total_cost,
  count(*) as count
from
  personnel p,
  order o
where
  p.prsnl_id = o.prsnl_id
  and o.prsnl_id in (
    Select prsnl_id 
    from
    organization_personnel_relation
    where
    org_id in (Select org_id from organization_personnel_relation where prsnl_id = (Select prsnl_id from personnel where prsnl_name = 'test')))
  and cost is not null
group by name
order by total_cost desc
limit 50;

I know it's not super deep nesting, but there are cases where I do see very deep nesting of parentheses, and I still would like to learn a lisp one day.

preguntado el 09 de septiembre de 13 a las 22:09

Can you post some example SQL for testing? Also, are you using the built-in SQL syntax highlighting, or did you install a specialized package? I think it's possible with your color scheme (I do it with different levels of JSON, for instance) but I need to check the scopes first. -

@MattDMo I am using a color modified version of the neon-theme that you can install using package control. If I can get nested braces/brackets/parentheses to come out a different color just by editing my theme, I will. I also have the JSON level formatting that you referenced. -

thanks for using my theme :) Just out of curiosity, what did you change and why? I'm trying to get as much feedback as possible, just abrir un problema y déjame saber. -

3 Respuestas

Here is another similar package:

Este plugin [RainbowBrackets] I wrote for SublimeText is to highlight brackets. It matches brackets you have added for the file type, then gives brackets at different levels different colors, in the cycle of the number of colors. colors are gave in the settings file, by default, there are 7 type of colors.

(github repository)

Respondido 11 Jul 19, 22:07

This isn't ideal, but you can make sure you have the following settings:

"match_brackets": true,
"match_brackets_angle": true,
"match_brackets_braces": true,
"match_brackets_content": true,
"match_brackets_square": true,

And then when you are in a paren or bracket, the corresponding one will be highlighted.

enter image description here

Respondido el 10 de Septiembre de 13 a las 16:09

This is what I already have from bracket highlighter, but I appreciate you posting on it. If you look up vim rainbow parens on google, you can see a better example of what I'm talking about. - Caleb

Yeah, I haven't seen anything like that, thus why my example isn't ideal. Would be very interested to see this implemented in sublime - Wesbos

This package seems like what you were looking for:

Rainbowth is a Sublime Text 3 plugin that automagically highlights matching parentheses, brackets, and curly braces in source code. While the name does imply a certain sequence of colors, the palette used to paint them is entirely configurable

(github repository)

Respondido 11 Jul 19, 22:07

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.