Sublime Forum

Skipping past auto-completed matching brackets

#1

Is there a shortcut to skip past these? If I type {(" the matching ones for these are inserted - then I type the middle content, but can’t figure out a shortcut to get to the end of the inserted matching brackets.

Thanks,
D.

0 Likes

#2

I personally have this added to my user keybindings. Pressing enter will skip past ), ", and ][code] { “keys”: “enter”], “command”: “move”, “args”: {“by”: “characters”, “forward”: true}, “context”:

    { "key": "following_text", "operator": "regex_contains", "operand": "^)\"\\]]", "match_all": true },
    { "key": "auto_complete_visible", "operator": "equal", "operand": false }
]   

}[/code]

0 Likes

How to tab out of braces/brackets
#3

Thank you very much - that works perfectly!

0 Likes

#4

Thank you C0D312,

this is really useful if you like the bracket autocompletion but don’t like the current way to step out of these brackets :smile:

Regards,
Highend

0 Likes

#5

does the wordCommand take other “args” besides “by” and “forward”? I was hoping it would have “count”

0 Likes

#6

Love this key mapping. On my MacBook Pro however, the enter key is chorded, requiring the ‘fn’ key. The key binding isn’t recognizing it. Any ideas?

0 Likes

#7

Why is this working for everyone else and not me?
This is my Default(Windows).sublime-keymap file: (same as the code above, but wrapped in ] and using “tab” instead of “enter”)

[code]
{ “keys”: “tab”], “command”: “move”, “args”: {“by”: “characters”, “forward”: true}, “context”:

        { "key": "following_text", "operator": "regex_contains", "operand": "^)\"\\]]", "match_all": true },
        { "key": "auto_complete_visible", "operator": "equal", "operand": false }
    ]   
}

][/code]

I restarted it , tried many times, tried using different key combos, none seemed to work. What am I doing wrong?

0 Likes

#8

The site ate up the [ characters snippet

0 Likes