Is it possible to make multiple lines a list with live template?

Hello,

I have a couple of lines

this is line 1
this is line 2
this is line 3
this is line 4

What I'd like to do is select the four lines and somehow live template would convert it for me to

<ul>
     <li>this is line 1</li>
     <li>this is line 2</li>
     <li>this is line 3</li>
     <li>this is line 4</li>
</ul>

I don't seem to be able to come up with something using live templates. That can only sorround either the first line, or all lines as a single <li></li> item. Is there a way to do this?

Thanks.

2 comments

Hi there,

Use Emmet (previously known as Zen Coding) for this.

Code | Surround with... | Emmet

screen01.png

http://docs.emmet.io/abbreviations/syntax/

0

Thank you! The link to the abbrev section is helpful!

0

Please sign in to leave a comment.