Hello,
I’ve been experimenting with ST2 for quite some time now and may take the leap from Textmate. I have Textmate html snippets ingrained into my brain. There are a few that really stand out that I can’t seem to figure out in ST2.
One snippet is to wrap a text block with
- , and each line with
- . For example, selecting the following text:
This is a list item 1 This is a list item 2 This is a list item 3
and hitting control+command+l will give me the option to output this:
<ul> <li><a href="#">This is a list item 1</a></li> <li><a href="#">This is a list item 2</a></li> <li><a href="#">This is a list item 3</a></li> </ul>
The snippet from Textmate is as followed:
<ul> ${TM_SELECTED_TEXT/.+/ <li><a href="#">$0<\/a><\/li>/g} </ul>
Similarly, how would I go about selecting text, and wrapping it with the “a href” tag?
Thanks in advance!