Hi开发者_开发技巧 I am following the NerdDinner MVC tutorial and wanted to copy a section of code from web page into Default.aspx page(some markup) . However these lines are copied in prefixed by line numbers - see below.This obviouslmy will not compile-how do I copy without these line numbers appearing.
23. <%=Html.Encode(Model.Description) %>
24. </p>
25. <p>
26. <strong>Organizer:</strong>
27. <%=Html.Encode(Model.HostedBy) %>
28. (<%=Html.Encode(Model.ContactPhone) %>)
29. </p>
30.
31. <%= Html.ActionLink("Edit Dinner", "Edit", new { id=Model.DinnerID })%> |
32. <%= Html.ActionLink("Delete Dinner","Delete", new { id=Model.DinnerID})%>
33.
34.</asp:Content>
Gosh, this would be so easy if you were using Visual Studio 2010 -- they added in a "vertical select" option (hold Alt+click+drag... or Alt+shift+cursor movements), which you could use to select only the line numbers and remove them with a single DEL keystroke.
But I think what you'll want to do in VS2008 is record a macro:
Position your cursor before the beginning of a line number.
Press Ctrl+Shift+R, delete the number using the DEL key, press arrow down to move to the beginning of the next line, then press Ctrl+Shift+R again.
Now, every time you press Ctrl+Shift+P, you will play back the macro and delete another line. Repeat until you've removed all the line numbers.
Use regexbuddy if you have it sitting around or get a free alternative.
Actually Warren, that works fine in VS2008 (and a ton of other programs, including Notepad++).
I would have just added a comment to Warren's, but I don't have the rep yet, sorry.
精彩评论