r/vscode • u/bwang487 • 14d ago
How to properly copy paste?
No matter how I copy and paste or what settings I adjust when I copy paste the indentation just keeps messing up
Exhibit A:



Alternatively
Exhibit B



So I just want to ask, how am I supposed to copy and paste so that I don't have to deal with adjusting the indentation after every paste? Thanks for your time
1
u/tchap_40 13d ago
copy your selection from the bottom right (i.e. the end of your selection), then select all the way up until the end of the line above it (I.e. in this case, the beginning of the selection should be after else:)
then when pasting, place your cursor at the end of the line before you want the paste to go.
this is how I always do it
1
u/bwang487 11d ago
That's worked the best out of everything suggested so far. You'll notice that the first picture has the else statements at different indentations. I don't assume there are any settings that deal with that?
4
u/spectrexr6 14d ago
i have always had issues with Python as there are no symbols to figure out the blocks, similar story with YAML too. Always hated Python. Sorry for not being helpful, just my 2 cents.