to be
a problem slover

how to copy and paste folded code as it is in vscode

Problem

If you copy and paste folded code in vscode or jetbrain IDEs, the code will expand automaticly. What you see is not what you get.

But sometimes we’d like to keep the code folded, we just need the skeleton. So how to do it?

Solution

Step1: Open your file by vscode

Step2: cmd + shift + p (mac) or ctrl+shift+p (windows) to open Command Palette, search and select Fold All

Step3: Toolbar -> Selection -> Column Selection Mode

Step4: Column select all the code, copy and paste, done!

check the gif https://cdn.liushiming.cn/img/2022-04-14_21-18-44.gif

赞(6) 打赏
欢迎转载,注明出处:刘世明的博客 » how to copy and paste folded code as it is in vscode

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

觉得文章有用就打赏一下作者

支付宝扫一扫打赏

微信扫一扫打赏