I used a macro to do this:
You can use ctrl+m (to jump to the other bracket). You also have to be careful where your cursor is, but again there are keyboard shortcuts to take you to (B)eginning (O)f (L)ine (BOL), EOL etc.
You can write then as well as record the key presses, (ctrl+alt+shift+q to start recording I think), this is what mine looks like (caveat I’m not using ST at the moment, so am probably a bit rusty, and I’m not 100% sure what this does, I’ve saved it as CommentStructure.sublime-macro, so this is just to give you an example)
[
{
"args":
{
"extend": false,
"to": "bol"
},
"command": "move_to"
},
{
"args":
{
"block": false
},
"command": "toggle_comment"
},
{
"args":
{
"extend": false,
"to": "bol"
},
"command": "move_to"
},
{
"args":
{
"by": "lines",
"forward": true
},
"command": "move"
},
{
"args":
{
"block": false
},
"command": "toggle_comment"
},
{
"args":
{
"extend": false,
"to": "bol"
},
"command": "move_to"
},
{
"args":
{
"to": "brackets"
},
"command": "move_to"
},
{
"args":
{
"block": false
},
"command": "toggle_comment"
},
{
"args":
{
"extend": false,
"to": "bol"
},
"command": "move_to"
}
]
Hopefully this’ll get you started…