Reputation: 253
TextMate 1 had a preference called "Auto-pair characters (quotes etc.)" that would allow you to enable or disable the auto pairing functionality.
Is it possible to disable this feature in TextMate 2?
Upvotes: 23
Views: 3811
Reputation: 4779
A follow-up for Ruby coders. After disabling auto-pairing, you'll still find that typing #
inside a double-quoted ("..."
) string expands to #{}
. If you want to disable this:
Now you can type "#
without any auto-expansion/pairing. If you like typing #
and having the first {
appear but don't want the closing }
added, then instead of disabling the item, just edit in the bottom pane to remove the trailing }
:
#{${1:$TM_SELECTED_TEXT}
If you like selecting text within strings and typing #
to have it enclosed in #{...}
though, the above changed will make it quite awkward, so beware.
Upvotes: 0
Reputation: 35032
Automatic "Typing Pairs" is a TextMate 2 Hidden Setting
When you type an opening brace, parenthesis, quote character, or similar, TextMate will insert the closing character.
Disable via Terminal:
defaults write com.macromates.TextMate disableTypingPairs YES
Upvotes: 11
Reputation: 32943
You can disable it for a given bundle as explained in this issue on GitHub.
Basically you have to edit an option file of the bundle and add smartTypingPairs = ( );
near the end of the file.
I don't know if this can be generalized using the .tm_properties
files but you are welcome to try (and report your results).
There is also a user defaults key for this:
defaults write com.macromates.TextMate disableTypingPairs -bool YES
Upvotes: 30