Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSCode Multiple Cursor Cut/Paste Behavior Changed

I am trying to copy/paste several lines of code, but it appears that the behavior for this has changed and I'm not sure how to correct this.

When I select multiple words (cursor on each word). Copy. Place the same number of cursors somewhere else. Paste. Instead of pasting one word with each cursor, it is pasting all words where the last cursor is located.

Versions:

  • VS Code Version: 1.39.2
  • Commit: 6ab598523be7a800d7f3eb4d92d7ab9a66069390
  • OS: Linux x64 4.15.0-65-generic (Elementary OS 5.0)

Paste Example

Is there a setting that I am unaware of? I haven't found a setting that affects this. And any search I do is a variation of this question. The answer in this question shows the desired/expected behavior.

like image 220
tbriggs707 Avatar asked May 14 '26 05:05

tbriggs707


2 Answers

When you select multiple words (cursor on each word). Copy. Place the same number of cursors somewhere else in a series (as you state in your example). Paste.

Ctrl + Shift + V

This also work is when you place the cursor on different line as well (same number of cursor as copied)

like image 192
KamalHalim Avatar answered May 16 '26 20:05

KamalHalim


I submitted a bug to VS Code and @alexandrudima helped me find the answer.

answer

Both workarounds suggested worked for me, but I also found that Ctrl+Shift+V, @KamalHalim's answer, worked as well.

like image 32
tbriggs707 Avatar answered May 16 '26 20:05

tbriggs707



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!