wootscootinboogie
wootscootinboogie

Reputation: 8695

Surround each line in VS2010 with an html tag

I have a list of the 50 states a la

Alabama
Alaska
Arizona

I would like to wrap each individual line with an anchor tag. Is this possible to do all at once? I see that there's a surround with in VS but not for each individual line. I'm using Visual Studio 2010 but any program that could be used would be fine.

So I would like each line to be wrapped something akin to

<a href="#" id="stateName">StateName</a>

Upvotes: 0

Views: 146

Answers (2)

Sean
Sean

Reputation: 15144

  1. Copy the values into Column A in a blank spreadsheet
  2. Create a formula in cell B1: ="<a href=""#"" id=""" & A1 & """>" & A1 & "</a>"
  3. Copy the formula down for each row
  4. Copy out the results in column B.

Upvotes: 0

fjdumont
fjdumont

Reputation: 1537

You may want to have a look at Ala Shibans Multi Editing Extension, which allows you to work with multiple cursors at once.

I stole an animated GIF from Scott Hanselmans Blog:

enter image description here

Upvotes: 1

Related Questions