Sublime Forum

How to select matching parentheses in Sublime

#1

I would like to select matching parentheses/braces/brackets in Sublime. I don’t mean to select the text between them, I mean just them; parentheses. So you can change one type to another without going back and fort. Its like having 2 cursors at the same time on them.

0 Likes

#2

Even if a plugin select parentheses/braces/brackets for you, how do you change them into others in a single step?


if you have BracketHighlighter installed, this is what I use:

    {
        // swap bracket
        "keys": ["alt+s", "alt+b"],
        "command": "swap_brackets",
        "args": { "async": true }
    },
    {
        // swap quotes
        "keys": ["alt+s", "alt+q"],
        "command": "bh_async_key",
        "args": {
            "lines": true,
            "plugin": {
                "command": "bh_modules.swapquotes",
                "type": ["single_quote", "double_quote", "py_single_quote", "py_double_quote"]
            }
        }
    },
2 Likes

#3

Its working. But how to keep only that functionality from the plugin. I don’t need the rest.

0 Likes

#4

Unfortunately I don’t know. I think it’s probably not possible since it relies on those brackets/quotes rules. You probably have to write your own plugin or wait for others’ suggestions.

1 Like