Sublime Forum

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

#1

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:

 @include |;

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

@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.

0 Likes

#2

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”.

0 Likes

#3

I’ll adjust the regex in the keybinding to handle this situation in the next build

0 Likes

#4

Cool thanks. It’s in there and working. Your responsiveness and development pace is breathtaking. :smile:

0 Likes