Reputation: 51
When I copy folded code it just pastes the beginning line (that's visible).
For example if I copy this code when it's folded:
Expanded(
flex: 2,
child: Image(
image: AssetImage('images/dice1.png'),
),
),
It will just paste the starting code:
Expanded(
Upvotes: 5
Views: 4644
Reputation: 1
in Visual Studio Code
just press ( Ctrl + Shift + [ ) to fold code and ( Ctrl + Shift + Down ) to selected code.
and then copy selected code ( Ctrl + c ).
in mac:
Command = ctrl
Options = alt
Upvotes: -1
Reputation: 4745
You have to select also the end of the folded range to successfully copy all the folded content.
See this issue.
A workaround could be to add this line in settings.json:
"editor.foldingStrategy": "indentation"
That would make visible that ending range making it possible for you to select up to it and including it.
Upvotes: 3