【问题标题】:Copy & Paste folded Code in Visual Studio Code在 Visual Studio Code 中复制和粘贴折叠的代码
【发布时间】:2021-02-09 11:30:32
【问题描述】:

当我复制折叠代码时,它只是粘贴开始行(可见)。

例如,如果我在折叠时复制此代码:

Expanded(
  flex: 2,    
  child: Image(
    image: AssetImage('images/dice1.png'),
  ),
),

它只会粘贴起始代码:

Expanded(

【问题讨论】:

    标签: visual-studio-code copy-paste folding


    【解决方案1】:

    您还必须选择折叠范围的末尾才能成功复制所有折叠内容。

    看到这个issue

    一种解决方法是在 settings.json 中添加这一行:

    "editor.foldingStrategy": "indentation"
    

    这将使结束范围可见,使您可以选择并包含它。

    【讨论】:

      猜你喜欢
      • 2017-01-03
      • 2015-09-29
      • 1970-01-01
      • 2021-05-09
      • 2018-07-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-07-16
      相关资源
      最近更新 更多