<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.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>Did you know... You can Right-drag code to do a Move or a Copy? - #170</title><link>http://blogs.msdn.com/saraford/archive/2008/03/12/did-you-know-you-can-right-drag-code-to-do-a-move-or-a-copy-170.aspx</link><description>Today's tip was submitted by a blog reader.&amp;#160; I had no clue that you could do this.&amp;#160; Select a line of code, and then right- drag that line to anywhere within your editor (or into another editor window).&amp;#160; Then you'll get this little menu</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Did you know... You can Right-drag code to do a Move or a Copy? - #170</title><link>http://blogs.msdn.com/saraford/archive/2008/03/12/did-you-know-you-can-right-drag-code-to-do-a-move-or-a-copy-170.aspx#8169198</link><pubDate>Wed, 12 Mar 2008 15:24:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8169198</guid><dc:creator>VS Enthusiast</dc:creator><description>&lt;p&gt;It's always nice to learn something new. &amp;nbsp;I always use cut-and-paste, but drag-and-drop seems just a &amp;nbsp;bit more efficient.&lt;/p&gt;
&lt;p&gt;Thanks for the tip!&lt;/p&gt;</description></item><item><title>re: Did you know... You can Right-drag code to do a Move or a Copy? - #170</title><link>http://blogs.msdn.com/saraford/archive/2008/03/12/did-you-know-you-can-right-drag-code-to-do-a-move-or-a-copy-170.aspx#8169511</link><pubDate>Wed, 12 Mar 2008 16:05:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8169511</guid><dc:creator>ccatto</dc:creator><description>&lt;p&gt;Hey Now Sara,&lt;/p&gt;
&lt;p&gt;This one is realy neat, I never knew about this one. It's quite useful too. &lt;/p&gt;
&lt;p&gt;Also I saw a post recently about your sessions on CodePlex &amp;amp; Tip of the day. Hope they go or have gone well. CodePlex is a really great site, I've been using it more &amp;amp; more lately.&lt;/p&gt;
&lt;p&gt;as always thx 4 the info,&lt;/p&gt;
&lt;p&gt;Catto&lt;/p&gt;</description></item><item><title>re: Did you know... You can Right-drag code to do a Move or a Copy? - #170</title><link>http://blogs.msdn.com/saraford/archive/2008/03/12/did-you-know-you-can-right-drag-code-to-do-a-move-or-a-copy-170.aspx#8169588</link><pubDate>Wed, 12 Mar 2008 16:13:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8169588</guid><dc:creator>Mark</dc:creator><description>&lt;p&gt;This tip works for almost any windows application as far as I know.&lt;/p&gt;</description></item><item><title>re: Did you know... You can Right-drag code to do a Move or a Copy? - #170</title><link>http://blogs.msdn.com/saraford/archive/2008/03/12/did-you-know-you-can-right-drag-code-to-do-a-move-or-a-copy-170.aspx#8169689</link><pubDate>Wed, 12 Mar 2008 16:26:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8169689</guid><dc:creator>Jimbo</dc:creator><description>&lt;p&gt;Nope...didn't know that one either...although it makes sense. &amp;nbsp;It's the same behaviour as when you drag an icon with right button...only contextually correct. &amp;nbsp;One thing I love about Windows...it's consistent if nothing else. &amp;nbsp;That and the ability to do anything four different ways!! :)&lt;/p&gt;</description></item><item><title>re: Did you know... You can Right-drag code to do a Move or a Copy? - #170</title><link>http://blogs.msdn.com/saraford/archive/2008/03/12/did-you-know-you-can-right-drag-code-to-do-a-move-or-a-copy-170.aspx#8171556</link><pubDate>Wed, 12 Mar 2008 20:22:24 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8171556</guid><dc:creator>JMD</dc:creator><description>&lt;p&gt;Maybe this is too elementary, but the same dragging operation can be done without incurring the usability &amp;quot;penalty&amp;quot; of dealing with a redundant context menu. &amp;nbsp;*Left*-dragging a selection of code performs a &amp;quot;move&amp;quot; -- unless you hold the Ctrl button while dragging, in which case the operation changes to a &amp;quot;copy&amp;quot;. &amp;nbsp;A [+] is added to the the mouse pointer to indicate such.&lt;/p&gt;
&lt;p&gt;Dragging to copy a selection actually works between disparate editors in many cases. &amp;nbsp;E.g. I can copy code from the IDE over into this comment editor in Firefox:&lt;/p&gt;
&lt;p&gt;using System;&lt;/p&gt;
&lt;p&gt;using System.Collections.Generic;&lt;/p&gt;
&lt;p&gt;using System.Management;&lt;/p&gt;</description></item><item><title>re: Did you know... You can Right-drag code to do a Move or a Copy? - #170</title><link>http://blogs.msdn.com/saraford/archive/2008/03/12/did-you-know-you-can-right-drag-code-to-do-a-move-or-a-copy-170.aspx#8174518</link><pubDate>Thu, 13 Mar 2008 00:42:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8174518</guid><dc:creator>Justin</dc:creator><description>&lt;p&gt;Normally I don't use the drag drop except to avoid over writing what is in the clipboard. (Don't like taking hands off the keyboard to go to the mouse... It's SOOO time consuming! The clipboard benefit is the point that I find really useful! Using the left button (with control for copy) is really neat!&lt;/p&gt;
&lt;p&gt;&amp;quot;Stump the Sara&amp;quot;: Hope your not running out of ideas ;)&lt;/p&gt;</description></item><item><title>re: Did you know... You can Right-drag code to do a Move or a Copy? - #170</title><link>http://blogs.msdn.com/saraford/archive/2008/03/12/did-you-know-you-can-right-drag-code-to-do-a-move-or-a-copy-170.aspx#8180100</link><pubDate>Thu, 13 Mar 2008 14:50:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8180100</guid><dc:creator>Shtong</dc:creator><description>&lt;p&gt;I didn't know that right click one but I've been using the ctrl-drag (with left button) to copy and just drag to move for a long time, it's a great shortcut for copy-pasting !&lt;/p&gt;
&lt;p&gt;For quick replacement of several single words like a variable name I also like the fact that ctrl-click selects an entire word, so if I want to replace every occurence of a var name in a function, I hold the ctrl key down, and do a click-and-v on every var name I want to replace. It's pretty fast once you get used to it.&lt;/p&gt;</description></item><item><title>re: Did you know... You can Right-drag code to do a Move or a Copy? - #170</title><link>http://blogs.msdn.com/saraford/archive/2008/03/12/did-you-know-you-can-right-drag-code-to-do-a-move-or-a-copy-170.aspx#8181100</link><pubDate>Thu, 13 Mar 2008 18:02:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8181100</guid><dc:creator>Michael Reynolds</dc:creator><description>&lt;p&gt;Thanks for reminding me of this feature...I'll start using it again immediately! &amp;nbsp;Also, works for Visual Studio 2005. &lt;/p&gt;</description></item><item><title>re: Did you know... You can Right-drag code to do a Move or a Copy? - #170</title><link>http://blogs.msdn.com/saraford/archive/2008/03/12/did-you-know-you-can-right-drag-code-to-do-a-move-or-a-copy-170.aspx#8183285</link><pubDate>Thu, 13 Mar 2008 21:27:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8183285</guid><dc:creator>Bruno Brant</dc:creator><description>&lt;p&gt;JDM beat me to it. You can use CTRL while dragging to avoid displaying the context menu.&lt;/p&gt;
&lt;p&gt;A tip: This doesn't use the clipboard, so, if you need to copy some text but doesn't want to lose whatever you have in the clipboard, you can drag-copy.&lt;/p&gt;</description></item><item><title>re: Did you know... You can Right-drag code to do a Move or a Copy? - #170</title><link>http://blogs.msdn.com/saraford/archive/2008/03/12/did-you-know-you-can-right-drag-code-to-do-a-move-or-a-copy-170.aspx#8277985</link><pubDate>Mon, 17 Mar 2008 05:50:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8277985</guid><dc:creator>Kyralessa</dc:creator><description>&lt;p&gt;Oogh. &amp;nbsp;A lot of the programmers I know would be better off if copying code were made harder, not easier. &amp;nbsp;:)&lt;/p&gt;</description></item><item><title>re: Did you know... You can Right-drag code to do a Move or a Copy? - #170</title><link>http://blogs.msdn.com/saraford/archive/2008/03/12/did-you-know-you-can-right-drag-code-to-do-a-move-or-a-copy-170.aspx#8342431</link><pubDate>Sat, 29 Mar 2008 00:46:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8342431</guid><dc:creator>Søren Pedersen</dc:creator><description>&lt;p&gt;Many text-editing &amp;quot;places&amp;quot; in Windows does this, and you can even do it with items in folders or on the desktop.&lt;/p&gt;
&lt;p&gt;I discovered this one myself by accident; a book fell on my mouse's right button and caused it to slide slightly, revealing this little popup menu...!&lt;/p&gt;</description></item><item><title>Indenting</title><link>http://blogs.msdn.com/saraford/archive/2008/03/12/did-you-know-you-can-right-drag-code-to-do-a-move-or-a-copy-170.aspx#8368994</link><pubDate>Tue, 08 Apr 2008 16:04:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8368994</guid><dc:creator>e34m5</dc:creator><description>&lt;p&gt;Is there a way to highlight multiple lines of code and then indenting or unindent all at the same time.&lt;/p&gt;</description></item><item><title>re: Indent, Unindent</title><link>http://blogs.msdn.com/saraford/archive/2008/03/12/did-you-know-you-can-right-drag-code-to-do-a-move-or-a-copy-170.aspx#8374088</link><pubDate>Thu, 10 Apr 2008 08:14:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8374088</guid><dc:creator>Rwg</dc:creator><description>&lt;p&gt;Due to the simplicity of the answer I'm not sure if this is what you wanted to hear?&lt;/p&gt;
&lt;p&gt;1) Select multiple lines of text with the usual mouse drag, or the keyboard using SHIFT+up or down arrow keys&lt;/p&gt;
&lt;p&gt;2) Press TAB to indent or shift+TAB to unindent the selection&lt;/p&gt;
&lt;p&gt;Incidentally, you can also select a block (square) region of text in Visual studio or Word by holding the ALT key down then dragging over the area with the mouse.&lt;/p&gt;</description></item><item><title>re: Did you know... You can Right-drag code to do a Move or a Copy? - #170</title><link>http://blogs.msdn.com/saraford/archive/2008/03/12/did-you-know-you-can-right-drag-code-to-do-a-move-or-a-copy-170.aspx#8381534</link><pubDate>Fri, 11 Apr 2008 21:27:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8381534</guid><dc:creator>Anthony Wykle</dc:creator><description>&lt;p&gt;I believe that with a little research one would find that both the &amp;lt;ctrl&amp;gt; / &amp;lt;alt&amp;gt; - left drag and the right drag tricks are actually a part of the windows common controls edit box functionality. I don't know about the right drag, but I know the modified left drag tricks have been a part of the standard windows UI since at least Win95.&lt;/p&gt;
&lt;p&gt;Side note: the right-drag trick doesn't work in the textarea implementation provided by MSIE 8.0. Maybe Microsoft should consider making the right-drag standard if it isn't?&lt;/p&gt;</description></item><item><title>re: Did you know... You can Right-drag code to do a Move or a Copy? - #170</title><link>http://blogs.msdn.com/saraford/archive/2008/03/12/did-you-know-you-can-right-drag-code-to-do-a-move-or-a-copy-170.aspx#8382054</link><pubDate>Fri, 11 Apr 2008 23:53:35 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8382054</guid><dc:creator>Will SQL for Food</dc:creator><description>&lt;p&gt;I'm inclined to think this is OS level functionality rather than VS or Word specific - I've tried it successfully on third party apps.&lt;/p&gt;
&lt;p&gt;Does that nullify it from the Stump Sara game since it's below VS core?&lt;/p&gt;
&lt;p&gt;Also:&lt;/p&gt;
&lt;p&gt;Clicking and holding the left mouse button for a second or two activates the same feature.&lt;/p&gt;
&lt;p&gt;And thanks for the ALT+click for selecting a rectangular area - that's nice! &amp;nbsp;I'm sure to find that useful in SQL Server, my bread and butter.&lt;/p&gt;</description></item><item><title>re: Did you know... You can Right-drag code to do a Move or a Copy? - #170</title><link>http://blogs.msdn.com/saraford/archive/2008/03/12/did-you-know-you-can-right-drag-code-to-do-a-move-or-a-copy-170.aspx#8397477</link><pubDate>Tue, 15 Apr 2008 15:56:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8397477</guid><dc:creator>Cp6uja</dc:creator><description>&lt;p&gt;WOW! That's what i call a genious feature!!&lt;/p&gt;
&lt;p&gt;This blowed my socks off my feet!&lt;/p&gt;
&lt;p&gt;You stupid americans...&lt;/p&gt;</description></item><item><title>re: Did you know... You can Right-drag code to do a Move or a Copy? - #170</title><link>http://blogs.msdn.com/saraford/archive/2008/03/12/did-you-know-you-can-right-drag-code-to-do-a-move-or-a-copy-170.aspx#8399865</link><pubDate>Thu, 17 Apr 2008 02:47:24 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8399865</guid><dc:creator>joe brownie </dc:creator><description>&lt;p&gt;iam trying to hack on warrock (a computer game) but i cant find out how &lt;/p&gt;</description></item><item><title>re: Did you know... You can Right-drag code to do a Move or a Copy? - #170</title><link>http://blogs.msdn.com/saraford/archive/2008/03/12/did-you-know-you-can-right-drag-code-to-do-a-move-or-a-copy-170.aspx#8420843</link><pubDate>Thu, 24 Apr 2008 08:40:35 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8420843</guid><dc:creator>feiyim</dc:creator><description>&lt;p&gt;hey sara,&lt;/p&gt;
&lt;p&gt;thats a nice one you got for us.i knew it existed but never gave a damn about it nor knew its efficacy.Now that you have alerted me and its preety good, am gonna try it.thanks&lt;/p&gt;</description></item><item><title>re: Did you know... You can Right-drag code to do a Move or a Copy? - #170</title><link>http://blogs.msdn.com/saraford/archive/2008/03/12/did-you-know-you-can-right-drag-code-to-do-a-move-or-a-copy-170.aspx#8484279</link><pubDate>Sat, 10 May 2008 22:04:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8484279</guid><dc:creator>Matthew</dc:creator><description>&lt;p&gt;Here's a fewthat I use every day...&lt;/p&gt;
&lt;p&gt;These are chord combinations, so hold the ctrl key down for both...&lt;/p&gt;
&lt;p&gt;CTRL+K, C - applies comments to a selected block of code.&lt;/p&gt;
&lt;p&gt;CTRL+K, U - remove (un-comments) a selected block of code.&lt;/p&gt;
&lt;p&gt;CTRL+K, K - toggles a bookmark for the line the cursor is on.&lt;/p&gt;
&lt;p&gt;CTRL+K, N - moves the cursor to the next bookmark, I cannot remember what moves to a previous bookmark right now.&lt;/p&gt;
&lt;p&gt;CTRL+K, S - brings up the &amp;quot;surround with&amp;quot; list for the selected block of code. &amp;nbsp;It's useful for selecting a block of code and putting it inside of a try/catch block, or conditional block, etc.&lt;/p&gt;
&lt;p&gt;-- Matthew&lt;/p&gt;</description></item></channel></rss>