Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

insert Multi-line block

Is it possible in Visual Studio or Management Studio to paste multi-line text block inside text document? For example my clipboard contains

1
2
3
4

my document contains

xxxyyy
xxxyyy
xxxyyy
xxxyyy

I can select space between x and y letters in diferent lines by Alt+Shift+Arrow but I cannot correctly insert my new text block. I want to see the following after insert:

xxx1yyy
xxx2yyy
xxx3yyy
xxx4yyy
like image 994
Yuriy Gavrishov Avatar asked Dec 14 '16 14:12

Yuriy Gavrishov


1 Answers

Yes it is.

Steps with mouse:

  • Select with mouse the 1 to 4 block.
  • Click copy.
  • Click between x and y in the first line.
  • Click paste.

Steps with keyboard:

  • Navigate with arrows just before 1.
  • Hold SHIFT and ALT, press 4 times down, one right, release SHIFT and ALT.
  • CTRL + C.
  • Navigate with arrows between x and y in the first line.
  • CTRL + V.

The trick is to ensure that your clipboard doesn't contain new lines after each number. If it does, you will get something like:

xxx1
2
3
4yyy
xxx1
2
3
4yyy
xxx1
2
3
4yyy
xxx1
2
3
4yyy
like image 150
piotrwest Avatar answered Oct 09 '22 20:10

piotrwest