amit thakkar
amit thakkar

Reputation: 21

Can we paste lines into visual studio "without carriage return"?

Lets say we have these lines in the editor

int a = 10;
print(a,b);
string b = "hello";

So what i would like to do is.. shift the 3rd line to the 2nd position similar to

int a = 10;
string b = "hello";
print(a,b);

I use ctrl+x or Shift + del to cut the line to the clipboard. But on pasting the line at 2nd position i get

int a = 10;
string b = "hello";

print(a,b);

The extra blank line at the 3rd line. is there any way to paste without that 3rd blank line. or for the matter an easier way to move and cut and paste lines. ?

Upvotes: 2

Views: 555

Answers (2)

amit thakkar
amit thakkar

Reputation: 255

Thank you so much for the answer!. i just stumbled on to a easier method and more flexible. With a Addon - Pro tools http://visualstudiogallery.msdn.microsoft.com/en-us/d0d33361-18e2-46c0-8ff2-4adea1e34fef

we can now use Alt + Arrow keys to move the lines up or down.

Upvotes: 0

BoltClock
BoltClock

Reputation: 723729

Shift+Alt+T swaps the current line with the line below it. So you'd put the caret (or cursor) on the second line, then use that keyboard shortcut to swap it with the third line.

Upvotes: 3

Related Questions