Visual Studio Code column mode paste

visual-studio-code

I can select a column in MS Visual Studio code with shift-alt and drag, but how do I paste a column? I can't find that anywhere. The column mode options on the keyboard cheat shortcuts list do not list this.

Best Answer

Column copied using shift + alt can be pasted as a column if you start cursor at exactly same number of lines as that of number of lines in your copied column contents.
Example:
Say the 2nd column in the following text is copied. (it has 2 rows)

foo foo1
bar bar1

Now, using same shift + alt, place cursors on two different rows. Say after 2 and 3 in below text:

1
2
3
4

Once you paste, the column will be pasted properly.

1
2foo1
3bar1
4
Related Question