Home Download Buy Blog Forum Support

How and where are automatic quote/bracket/etc. pairs defined

How and where are automatic quote/bracket/etc. pairs defined

Postby charlesroper on Tue Jun 21, 2011 5:31 pm

I'm bringing across the SCSS bundle from Textmate. It contains a smart typing pairs preferences file, but this doesn't seem to work in Sublime. Are typing pairs hard coded into Sublime, or are they in a prefs file somewhere? Most pairs seem to be covered by default, but while editing SCSS, there's a common case where the pair isn't triggered: if you hit +[tab] it expands to this:

Code: Select all
@include |;


If I now type something and then an opening bracket, it doesn't insert the closing bracket. E.g.

Code: Select all
@include prefix(;


The automatic pairing is being stopped when the caret is bumped up against a semi-colon. That's quite annoying, so it would be useful to be able to customise this so that a closing bracket is inserted, even when next to a semicolon.
charlesroper
 
Posts: 107
Joined: Thu Feb 18, 2010 7:30 am

Re: How and where are automatic quote/bracket/etc. pairs defined

Postby guillermooo on Wed Jun 22, 2011 7:26 am

As far as I know, everything re. auto pairing is done with key bindings. Search the default key bindings for "(" (including quotation marks).

The default key bindings file can be accessed through "Preferences | Default Key Bindings".
guillermooo
 
Posts: 728
Joined: Thu Jul 23, 2009 9:06 am

Re: How and where are automatic quote/bracket/etc. pairs defined

Postby jps on Wed Jun 22, 2011 10:39 am

I'll adjust the regex in the keybinding to handle this situation in the next build
jps
Site Admin
 
Posts: 3067
Joined: Wed Mar 19, 2008 12:33 pm

Re: How and where are automatic quote/bracket/etc. pairs defined

Postby charlesroper on Wed Jun 22, 2011 4:42 pm

Cool thanks. It's in there and working. Your responsiveness and development pace is breathtaking. :)
charlesroper
 
Posts: 107
Joined: Thu Feb 18, 2010 7:30 am


Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot], Yahoo [Bot] and 24 guests