microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
161.79k stars 28.44k forks source link

[folding] retain folded state on copy/paste #16082

Open sbfkcel opened 7 years ago

sbfkcel commented 7 years ago

It is recommended to support folding of the code snippet also retain its folded format

jrieken commented 7 years ago

@sbfkcel Can you please spare a few more words to describe this issue

sbfkcel commented 7 years ago

E.g: Now copy a piece of code (folding state) image

After pasting to another location, it is desirable to maintain its folded state. Of image

Rather than paste after the start image

I hope my description is accurate

sbfkcel commented 7 years ago

@jrieken

aeschli commented 6 years ago

To keep the number of issues in our inbox on a manageable level, we're closing issues that have been on the backlog for a long time but haven't gained traction: We look at the number of votes the issue has received and the number of duplicates issues filed. If you disagree and feel that this issue is crucial: We're happy to listen and to reconsider. Maybe you want to give it a try yourself and provide the feature through an extension or a PR: We're happy to give advise and get you started. Thanks for your understanding. Thanks for helping and happy coding!

rowild commented 4 years ago

I am glad this issue was re-opened, since I would really like to see this feature integrated! I still don't know, though, how to vote for this issue. Just by placing a "+1"?

rowild commented 4 years ago

@aeschli So how can I upvote? (You write "We look at the number of votes the issue has received...")

aeschli commented 4 years ago

To vote, add a :+1: on the description

rowild commented 4 years ago

Ok - thanks!

rowild commented 4 years ago

Hmmm... other, related issues had more votes. Here it is only me now it seems...

haywirephoenix commented 3 years ago

+1 for a "Paste Folded"

nardxxx commented 2 years ago

I need this. 1+

sbfkcel commented 2 years ago

@huahuayu

Validated is not the same problem as I describe what I hope to solve.

Column selection mode refers to turning a horizontal selection into a vertical selection.

When selecting, if you need to select the complete content of each line, you need to drag the cursor to the end of each line. And if it is in a folded state and copied and pasted, it is not pasting the complete content (that is, not including the folded part of the content, from your GIF demo, the code line number after pasting can also be clearly seen).

huahuayu commented 2 years ago

@sbfkcel ok then I will withdraw my comment. I only need to keep the function signature, so it's different.

garycoy commented 2 years ago

+1 for this feature

justclint commented 1 year ago
Mark3xtrm commented 1 year ago

+1

Vallek commented 1 year ago

+1 for an option)

paintbrushamster commented 1 year ago

+1 for this feature

YatFungLoo commented 11 months ago

+1

lobsterkatie commented 11 months ago

It would nice if this worked for Copy line down as well, which I use more often (together with Move line down) in cases where I'm want the copy in the same file. (The advantages being a) you don't have to be as precise in selecting what you want, and b) in Python, where indentation isn't automatically adjusted on paste, I don't end up pasting onto a line where there's already a tab character, thus shifting my first line out of place).

Interestingly, Copy line down and regular copy-pasting have opposite (undesirable) behaviors.

Copy-paste - the original stays folded, the pasted version gets unfolded:

image

Copy line down - the new copy stays folded, the original gets unfolded:

image

dvdmrn commented 7 months ago

+1

howk commented 6 months ago

+1

Botan626 commented 6 months ago

I upvote.

pjmattingly commented 5 months ago

+1

buhbuhbuhbowser commented 1 month ago

+1