Can I change the way Sublime Text 2 automatically selects pairs?

In Sublime Text 2, you can enter a string and then select a section of the string, as shown below:

enter image description here

You can then wrap the selected text in β€œjust typing one,” which gives you the following:

enter image description here

When you do this, the cursor will be between d and "I would really like it to end outside" at the end of the selected line.

enter image description here

Is this possible?

+7
source share
1 answer

This is not a function that I use, but it seems to work fine. Create a snippet like this:

<snippet> <content><![CDATA["$SELECTION"$0]]></content> </snippet> 

$0 indicates the exit point of the cursor. Paste it into your /Packages/User/Default (Linux).sublime-keymap file:

 { "keys": ["\""], "command": "insert_snippet", "args": {"name": "Packages/User/quotes.sublime-snippet"}} 
+6
source

All Articles