Home Download Buy Blog Forum Support

Skipping past auto-completed matching brackets

Skipping past auto-completed matching brackets

Postby DanyW on Thu Jan 26, 2012 9:00 pm

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.
DanyW
 
Posts: 8
Joined: Sat Jan 21, 2012 11:02 pm

Re: Skipping past auto-completed matching brackets

Postby C0D312 on Thu Jan 26, 2012 11:21 pm

I personally have this added to my user keybindings. Pressing enter will skip past ), ", and ]
Code: Select all
{ "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 }
    ]   
  }
C0D312
 
Posts: 1063
Joined: Sun Jul 10, 2011 3:23 am

Re: Skipping past auto-completed matching brackets

Postby DanyW on Thu Jan 26, 2012 11:57 pm

Thank you very much - that works perfectly!
DanyW
 
Posts: 8
Joined: Sat Jan 21, 2012 11:02 pm

Re: Skipping past auto-completed matching brackets

Postby highend on Fri Jan 27, 2012 12:06 am

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 :)

Regards,
Highend
highend
 
Posts: 94
Joined: Fri Jan 20, 2012 2:47 pm

Re: Skipping past auto-completed matching brackets

Postby atomi on Thu Jun 21, 2012 5:42 am

does the wordCommand take other "args" besides "by" and "forward"? I was hoping it would have "count"
atomi
 
Posts: 342
Joined: Thu Jan 20, 2011 5:06 pm
Location: Los Angeles CA US

Re: Skipping past auto-completed matching brackets

Postby code.prole on Wed Mar 06, 2013 10:09 pm

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?
code.prole
 
Posts: 1
Joined: Wed Mar 06, 2013 10:05 pm

Re: Skipping past auto-completed matching brackets

Postby whage on Thu Feb 27, 2014 6:19 am

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: Select all
[
   { "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 }
       ]   
   }
]



I restarted it , tried many times, tried using different key combos, none seemed to work. What am I doing wrong?
whage
 
Posts: 1
Joined: Thu Feb 27, 2014 6:17 am


Return to General Discussion

Who is online

Users browsing this forum: Google [Bot] and 18 guests