<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Duplicate line command for Visual Studio</title>
	<atom:link href="http://www.herrodius.com/blog/52/feed" rel="self" type="application/rss+xml" />
	<link>http://www.herrodius.com/blog/52</link>
	<description>Thoughts from a software developer</description>
	<lastBuildDate>Wed, 30 Nov 2011 09:13:06 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>By: mux</title>
		<link>http://www.herrodius.com/blog/52/comment-page-1#comment-15038</link>
		<dc:creator>mux</dc:creator>
		<pubDate>Tue, 15 Nov 2011 14:06:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.herrodius.com/blog/?p=52#comment-15038</guid>
		<description>You can also use built-in Visual Studio (at least 2010) feature: just put cursor on the line and press Ctrl+C &gt; Ctrl+V in a sequence. Found here:
http://vidmar.net/weblog/archive/2009/11/11/ldquosmartrdquo-duplicate-line-in-visual-studio-out-of-the-box.aspx</description>
		<content:encoded><![CDATA[<p>You can also use built-in Visual Studio (at least 2010) feature: just put cursor on the line and press Ctrl+C &gt; Ctrl+V in a sequence. Found here:<br />
<a href="http://vidmar.net/weblog/archive/2009/11/11/ldquosmartrdquo-duplicate-line-in-visual-studio-out-of-the-box.aspx" rel="nofollow">http://vidmar.net/weblog/archive/2009/11/11/ldquosmartrdquo-duplicate-line-in-visual-studio-out-of-the-box.aspx</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mykola</title>
		<link>http://www.herrodius.com/blog/52/comment-page-1#comment-14861</link>
		<dc:creator>Mykola</dc:creator>
		<pubDate>Wed, 29 Jun 2011 10:08:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.herrodius.com/blog/?p=52#comment-14861</guid>
		<description>Hi!
Thanks for useful macro!
Does anyone know how to achive similar results in VS Express, without Macro engine?</description>
		<content:encoded><![CDATA[<p>Hi!<br />
Thanks for useful macro!<br />
Does anyone know how to achive similar results in VS Express, without Macro engine?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: CSharpForeverMore</title>
		<link>http://www.herrodius.com/blog/52/comment-page-1#comment-14858</link>
		<dc:creator>CSharpForeverMore</dc:creator>
		<pubDate>Fri, 24 Jun 2011 14:35:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.herrodius.com/blog/?p=52#comment-14858</guid>
		<description>Guys - if you do one thing for yourselves - you&#039;ll read Scott Hanselman&#039;s tool listings.  Every decent developer knows that ReSharper is great (provided you&#039;ve got either VS2008 and a maximum 3 year old machine - or VS2010 and a 64bit, 12 GB dev mmachine).  If you have Visual Studio 2010 Professional and above, you can use the Extensions.  (Tools &gt; Extension Manager) for many of the features available as single downloads (VX10 Code Map, etc).  Also - check out CodeRush from the guys over at DevExpress.

Google is your friend. Everything is possible.</description>
		<content:encoded><![CDATA[<p>Guys &#8211; if you do one thing for yourselves &#8211; you&#8217;ll read Scott Hanselman&#8217;s tool listings.  Every decent developer knows that ReSharper is great (provided you&#8217;ve got either VS2008 and a maximum 3 year old machine &#8211; or VS2010 and a 64bit, 12 GB dev mmachine).  If you have Visual Studio 2010 Professional and above, you can use the Extensions.  (Tools &gt; Extension Manager) for many of the features available as single downloads (VX10 Code Map, etc).  Also &#8211; check out CodeRush from the guys over at DevExpress.</p>
<p>Google is your friend. Everything is possible.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Maxime</title>
		<link>http://www.herrodius.com/blog/52/comment-page-1#comment-14855</link>
		<dc:creator>Maxime</dc:creator>
		<pubDate>Thu, 12 May 2011 16:26:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.herrodius.com/blog/?p=52#comment-14855</guid>
		<description>Yay! Thanks a lot and have a good day! :)</description>
		<content:encoded><![CDATA[<p>Yay! Thanks a lot and have a good day! <img src='http://www.herrodius.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sven</title>
		<link>http://www.herrodius.com/blog/52/comment-page-1#comment-14714</link>
		<dc:creator>Sven</dc:creator>
		<pubDate>Wed, 20 Oct 2010 13:10:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.herrodius.com/blog/?p=52#comment-14714</guid>
		<description>Thanks for sharing!
I used the macro recorder in VS 2010 Pro. Your example was very helpful to connect macro and shortcut.
Cheers
Sven</description>
		<content:encoded><![CDATA[<p>Thanks for sharing!<br />
I used the macro recorder in VS 2010 Pro. Your example was very helpful to connect macro and shortcut.<br />
Cheers<br />
Sven</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mohamed Jbeli</title>
		<link>http://www.herrodius.com/blog/52/comment-page-1#comment-14630</link>
		<dc:creator>Mohamed Jbeli</dc:creator>
		<pubDate>Thu, 09 Sep 2010 18:12:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.herrodius.com/blog/?p=52#comment-14630</guid>
		<description>this is my code to invert the equality on a line
a = b becomes b = a
    Sub Invert()
        Dim line As String
        DTE.ActiveDocument.Selection.StartOfLine(0)
        DTE.ActiveDocument.Selection.EndOfLine(True)
        line = DTE.ActiveDocument.Selection.Text
        Dim EqMembers = line.Split(&quot;=&quot;)
        If EqMembers.Length &gt; 0 Then
            DTE.ActiveDocument.Selection.EndOfLine()
            Dim newLine = EqMembers(1) + &quot;=&quot; + EqMembers(0)
            DTE.ActiveDocument.Selection.StartOfLine(0)
            DTE.ActiveDocument.Selection.EndOfLine(True)
            While newLine.IndexOf(&quot;  &quot;) &gt; -1
                newLine = newLine.Replace(&quot;  &quot;, &quot; &quot;)
            End While
            DTE.ActiveDocument.Selection.Text = newLine
        End If
    End Sub</description>
		<content:encoded><![CDATA[<p>this is my code to invert the equality on a line<br />
a = b becomes b = a<br />
    Sub Invert()<br />
        Dim line As String<br />
        DTE.ActiveDocument.Selection.StartOfLine(0)<br />
        DTE.ActiveDocument.Selection.EndOfLine(True)<br />
        line = DTE.ActiveDocument.Selection.Text<br />
        Dim EqMembers = line.Split(&#8220;=&#8221;)<br />
        If EqMembers.Length &gt; 0 Then<br />
            DTE.ActiveDocument.Selection.EndOfLine()<br />
            Dim newLine = EqMembers(1) + &#8220;=&#8221; + EqMembers(0)<br />
            DTE.ActiveDocument.Selection.StartOfLine(0)<br />
            DTE.ActiveDocument.Selection.EndOfLine(True)<br />
            While newLine.IndexOf(&#8221;  &#8220;) &gt; -1<br />
                newLine = newLine.Replace(&#8221;  &#8220;, &#8221; &#8220;)<br />
            End While<br />
            DTE.ActiveDocument.Selection.Text = newLine<br />
        End If<br />
    End Sub</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonny D</title>
		<link>http://www.herrodius.com/blog/52/comment-page-1#comment-14625</link>
		<dc:creator>Jonny D</dc:creator>
		<pubDate>Mon, 23 Aug 2010 17:50:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.herrodius.com/blog/?p=52#comment-14625</guid>
		<description>Here&#039;s a simpler, faster, and better (works with a single undo) way...  The use of Collapse is not ideal, however:
Imports EnvDTE
Public Module DuplicateLine
    Sub DuplicateLine()
        Dim objSel As TextSelection = DTE.ActiveDocument.Selection
        If (objSel.IsEmpty()) Then
            objSel.SelectLine()
        End If
        objSel.Insert(objSel.Text, vsInsertFlags.vsInsertFlagsInsertAtEnd)
        objSel.Collapse()
    End Sub
End Module</description>
		<content:encoded><![CDATA[<p>Here&#8217;s a simpler, faster, and better (works with a single undo) way&#8230;  The use of Collapse is not ideal, however:<br />
Imports EnvDTE<br />
Public Module DuplicateLine<br />
    Sub DuplicateLine()<br />
        Dim objSel As TextSelection = DTE.ActiveDocument.Selection<br />
        If (objSel.IsEmpty()) Then<br />
            objSel.SelectLine()<br />
        End If<br />
        objSel.Insert(objSel.Text, vsInsertFlags.vsInsertFlagsInsertAtEnd)<br />
        objSel.Collapse()<br />
    End Sub<br />
End Module</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Diego</title>
		<link>http://www.herrodius.com/blog/52/comment-page-1#comment-14624</link>
		<dc:creator>Diego</dc:creator>
		<pubDate>Sat, 21 Aug 2010 13:46:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.herrodius.com/blog/?p=52#comment-14624</guid>
		<description>Ok, you have to Name your Macro &quot;DuplicateLastLineModule&quot; or if you want to change that name, you must change the name in the script file as well.
After that, go to Tools -&gt; Options -&gt; Environment -&gt; Keyboard.
On the search box, enter
Macros.[NAME OF THE MACRO MODULE].DuplicateLastLineModule.DuplicateLine

Now you can assign a keyboard shortcut.</description>
		<content:encoded><![CDATA[<p>Ok, you have to Name your Macro &#8220;DuplicateLastLineModule&#8221; or if you want to change that name, you must change the name in the script file as well.<br />
After that, go to Tools -&gt; Options -&gt; Environment -&gt; Keyboard.<br />
On the search box, enter<br />
Macros.[NAME OF THE MACRO MODULE].DuplicateLastLineModule.DuplicateLine</p>
<p>Now you can assign a keyboard shortcut.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Diego</title>
		<link>http://www.herrodius.com/blog/52/comment-page-1#comment-14623</link>
		<dc:creator>Diego</dc:creator>
		<pubDate>Sat, 21 Aug 2010 13:23:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.herrodius.com/blog/?p=52#comment-14623</guid>
		<description>Same here, this does not work with VS 2008 Pro.</description>
		<content:encoded><![CDATA[<p>Same here, this does not work with VS 2008 Pro.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gary Oak</title>
		<link>http://www.herrodius.com/blog/52/comment-page-1#comment-14257</link>
		<dc:creator>Gary Oak</dc:creator>
		<pubDate>Tue, 02 Feb 2010 02:00:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.herrodius.com/blog/?p=52#comment-14257</guid>
		<description>This didn&#039;t work for me in VS 2008 Pro.</description>
		<content:encoded><![CDATA[<p>This didn&#8217;t work for me in VS 2008 Pro.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

