Home Download Buy Blog Forum Support

Wrap Each Line in HTML Tag (v2)

Wrap Each Line in HTML Tag (v2)

Postby dom111 on Fri Jun 10, 2011 9:02 am

Based on the information provided by adzenith about modifying the cursor location using .sel(), I've made another plugin that I find myself using all the time, wrap each in tag. So if you have the following text:

Code: Select all

And select all the lines and run the function you'll get:

Code: Select all

with all the <li>s selected ready for you to overtype with whatever tag you prefer (this is based on TextMate functionality, to help my transition!). You will have to click (or press Escape) to return the cursor to a single position (unless there's another method I don't know about...).

Again, if this is duplicating another plugin/built-in function please let me know! I'd always rather use original functions, than plugins!

You can get it here:

Posts: 12
Joined: Wed Jun 08, 2011 9:13 am
Location: UK

Re: Wrap Each Line in HTML Tag (v2)

Postby nerotic on Sun Aug 07, 2011 10:35 pm

Mind telling us how to actually trigger it?

Looks great and I'd find this *very* useful.

Posts: 5
Joined: Sun Feb 06, 2011 10:14 am

Re: Wrap Each Line in HTML Tag (v2)

Postby jps on Mon Aug 08, 2011 11:01 am

btw, you don't need a plugin to do this:

1. Select the lines of interest
2. Use "Selection/Split into Lines" (Ctrl+Shift+L on Windows and Linux, Cmd+Shift+L on OS X)
3. Use the regular "Wrap Selection with Tag" function from the command palette
Site Admin
Posts: 3216
Joined: Wed Mar 19, 2008 12:33 pm

Return to Plugin Announcements

Who is online

Users browsing this forum: No registered users and 9 guests