<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://www.connicus.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Terry Thibodeau's Blog : Visual Studio, productivity</title><link>http://www.connicus.com/archive/tags/Visual+Studio/productivity/default.aspx</link><description>Tags: Visual Studio, productivity</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.2)</generator><item><title>Consolidating and Version-controlling Development Settings</title><link>http://www.connicus.com/archive/2008/05/06/Consolidating-and-Version_2D00_controlling-Development-Settings.aspx</link><pubDate>Tue, 06 May 2008 18:45:00 GMT</pubDate><guid isPermaLink="false">676f6b53-914a-4440-92e2-68dcb69a897b:71</guid><dc:creator>Terry Thibodeau</dc:creator><slash:comments>2</slash:comments><comments>http://www.connicus.com/comments/71.aspx</comments><wfw:commentRss>http://www.connicus.com/commentrss.aspx?PostID=71</wfw:commentRss><description>Those who know me know that I hate repetition. Reducing duplication and improving productivity is usually the driving force behind much that I do with computers (other than my day job of software development). After installing Visual Studio 2008 and new...(&lt;a href="http://www.connicus.com/archive/2008/05/06/Consolidating-and-Version_2D00_controlling-Development-Settings.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://www.connicus.com/aggbug.aspx?PostID=71" width="1" height="1"&gt;</description><category domain="http://www.connicus.com/archive/tags/Resharper/default.aspx">Resharper</category><category domain="http://www.connicus.com/archive/tags/tools/default.aspx">tools</category><category domain="http://www.connicus.com/archive/tags/productivity/default.aspx">productivity</category><category domain="http://www.connicus.com/archive/tags/Visual+Studio/default.aspx">Visual Studio</category></item><item><title>Visual Studio HTML link creation macro</title><link>http://www.connicus.com/archive/2007/12/19/visual-studo-html-link-macro.aspx</link><pubDate>Wed, 19 Dec 2007 23:54:00 GMT</pubDate><guid isPermaLink="false">676f6b53-914a-4440-92e2-68dcb69a897b:74</guid><dc:creator>Terry Thibodeau</dc:creator><slash:comments>1</slash:comments><comments>http://www.connicus.com/comments/74.aspx</comments><wfw:commentRss>http://www.connicus.com/commentrss.aspx?PostID=74</wfw:commentRss><description>&lt;P&gt;Today, I was editing some HTML in an aspx content page that I had pasted in from a Word doc. The document had quite a few&amp;nbsp;URLs in it that needed "linkifying" (add "&amp;lt;a href", etc).&lt;/P&gt;
&lt;P&gt;As I find myself doing this kind of editing quite a bit, I decided to write a quick macro to accomplish the task. There are many improvements that could be made to automatically search out URLs, set the target, etc. but, this is a first iteration. Feel free to share your improvements. ;)&lt;/P&gt;
&lt;DIV class=Code&gt;
&lt;P style="MARGIN:0px;"&gt;&lt;SPAN style="COLOR:blue;"&gt;Sub&lt;/SPAN&gt; Linkify()&lt;/P&gt;
&lt;P style="MARGIN:0px;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN:0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR:blue;"&gt;Dim&lt;/SPAN&gt; selection &lt;SPAN style="COLOR:blue;"&gt;As&lt;/SPAN&gt; TextSelection = &lt;SPAN style="COLOR:blue;"&gt;CType&lt;/SPAN&gt;(DTE.ActiveDocument.Selection, TextSelection)&lt;/P&gt;
&lt;P style="MARGIN:0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR:blue;"&gt;Dim&lt;/SPAN&gt; selectedText &lt;SPAN style="COLOR:blue;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="COLOR:blue;"&gt;String&lt;/SPAN&gt; = selection.Text.Trim()&lt;/P&gt;
&lt;P style="MARGIN:0px;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN:0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR:blue;"&gt;If&lt;/SPAN&gt; selectedText = &lt;SPAN style="COLOR:blue;"&gt;String&lt;/SPAN&gt;.Empty &lt;SPAN style="COLOR:blue;"&gt;Then&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN:0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; MsgBox(&lt;SPAN style="COLOR:#a31515;"&gt;"Nothing selected"&lt;/SPAN&gt;, MsgBoxStyle.Exclamation)&lt;/P&gt;
&lt;P style="MARGIN:0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR:blue;"&gt;Exit&lt;/SPAN&gt; &lt;SPAN style="COLOR:blue;"&gt;Sub&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN:0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR:blue;"&gt;End&lt;/SPAN&gt; &lt;SPAN style="COLOR:blue;"&gt;If&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN:0px;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN:0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; selection.Delete()&lt;/P&gt;
&lt;P style="MARGIN:0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; selection.Insert(&lt;SPAN style="COLOR:blue;"&gt;String&lt;/SPAN&gt;.Format(&lt;SPAN style="COLOR:#a31515;"&gt;"&amp;lt;a href=""{0}"" target=""_blank""&amp;gt;{0}&amp;lt;/a&amp;gt;"&lt;/SPAN&gt;, selectedText))&lt;/P&gt;
&lt;P style="MARGIN:0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; selection.LineDown()&lt;/P&gt;
&lt;P style="MARGIN:0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; selection.StartOfLine(vsStartOfLineOptions.vsStartOfLineOptionsFirstText)&lt;/P&gt;
&lt;P style="MARGIN:0px;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN:0px;"&gt;&lt;SPAN style="COLOR:blue;"&gt;End&lt;/SPAN&gt; &lt;SPAN style="COLOR:blue;"&gt;Sub&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
&lt;P&gt;In Visual Studio, select the URL you wish to "linkify" &lt;/P&gt;
&lt;DIV class=Code&gt;&lt;SPAN class=codeHighlight&gt;http://www.connicus.com&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;P&gt;and run the macro. Voila!&lt;/P&gt;
&lt;DIV class=Code&gt;&lt;SPAN style="COLOR:blue;"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR:#a31515;"&gt;a&lt;/SPAN&gt; &lt;SPAN style="COLOR:red;"&gt;href&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;="http://www.connicus.com"&lt;/SPAN&gt; &lt;SPAN style="COLOR:red;"&gt;target&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;="_blank"&amp;gt;&lt;/SPAN&gt;http://www.connicus.com&lt;SPAN style="COLOR:blue;"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR:#a31515;"&gt;a&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;&amp;gt;&lt;/SPAN&gt; &lt;/DIV&gt;&lt;img src="http://www.connicus.com/aggbug.aspx?PostID=74" width="1" height="1"&gt;</description><category domain="http://www.connicus.com/archive/tags/productivity/default.aspx">productivity</category><category domain="http://www.connicus.com/archive/tags/Visual+Studio/default.aspx">Visual Studio</category><category domain="http://www.connicus.com/archive/tags/macros/default.aspx">macros</category></item></channel></rss>