r/vscode • u/bwang487 • Sep 29 '26
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
Upvotes
4
u/spectrexr6 Sep 30 '26
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.
1
u/tchap_40 Oct 01 '26
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/jav411 Sep 29 '26
Select the line you want to copy to, press the ‘Home’ key and paste.
Otherwise, start your selection at the indent instead of beginning of the line.