5

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(

3 Answers 3

3

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.

Sign up to request clarification or add additional context in comments.

Comments

0

Just select and copy up to the next line (after the fold).

Comments

-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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.