Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to ignore a collapsed code folding block while copying?

I'm working on a Vue.js project, and I have a rather large array of data within one of my components that takes up a lot of space in my file. I often find myself wanting to copy various parts of the code from this component, but I don't want this array to be copied.

In VS Code, I have the ability to collapse this array, but when I try to copy the code, the collapsed array is still being copied. Is there any way to tell the editor to ignore the collapsed code block when copying?

like image 417
gileneusz Avatar asked Nov 17 '25 14:11

gileneusz


1 Answers

In Visual Studio Code you can use multi-cursor selection for copying code while ignoring what is folded in.

Press Ctrl + Shift and without releasing them start to highlight text that you want to copy with your mouse.

like image 189
NoName Avatar answered Nov 21 '25 09:11

NoName