Sublime Forum

Disabling auto-pair quotes for a particular syntax?

#1

I’m messing around making a .sublime-syntax for SmileBASIC, a BASIC variant for Nintendo 3DS. In this language, the single quote character (’) is used to start a comment - like // in C - and so I want to disable auto-pairing for this characters as part of the syntax definition. However, ideally I want parentheses and double quotes to continue to auto-pair, if the user has not disabled this feature.

How can I achieve this? My searched have found nothing.

0 Likes

#2

This can be done by creating a .sublime-keymap file in your Package that will override the key to just insert a single apostrophe when the scope at the caret matches your syntax. I can’t find any concrete examples of this being done at the moment to reference though. EDIT: yes, I can:

1 Like