Hello all,
I'm having a problem with matching character pairs in TextMate 2, and I'm wondering if it's a known issue or something specific to my installation.
For example, if I open a JavaScript file and type the following:
$(#id_name)
and then go back and place my caret before the # sign, and type a single-quote (or any other matched pair), I end up with:
$(''#id_name)
with my caret now between the matched pair. Selecting all of #id_name before typing a quote character works properly, but obviously requires use of the mouse.
I've confirmed that this happens in JavaScript and Python, but not in CSS or HTML. In fact, in those languages, there appears to be no matched pairing happening at all.
I never really used the matched pairs in TM1, so mostly I'd like to know if there's a way to turn this feature off altogether, but I'm glad to provide any other information required. My .tm_properties file is extremely sparse, and I'm not using any 3rd party plugins.
-phil
On 30/03/2012, at 22.12, Phil Christensen wrote:
I'm having a problem with matching character pairs […]
$(‸#id_name) → $('‸'#id_name) [edit]
[…] this happens in JavaScript and Python, but not in CSS or HTML. In fact, in those languages, there appears to be no matched pairing happening at all.
There are two settings affecting this:
1) the character pairs: http://manual.macromates.com/en/preferences_items#paired_characters — for prose (e.g. HTML) the ' character has not been setup to be paired, since it’s more likely used for contractions. 2) word characters: http://blog.macromates.com/2012/clever-completion/ — the pairing is disabled when typing in front of a word character. Since # is not setup as a word character, you get the pairing even when typing in front of that character. It probably doesn’t make sense to change that though.
I never really used the matched pairs in TM1, so mostly I'd like to know if there's a way to turn this feature off altogether […]
There is no global preference (like in 1.x) but you could setup an empty array (see above link to the 1.x manual).