What's the difference between "smart indent pasted lines" and "reformat on paste"?

It seems reformat on paste "reformat block" does exacly the same thing as the smart indent pasted lines. This confused me a lot because I thought turning off reformat on paste wasn't working and I was stuck with broken paste (as you've seen from previous posts, many people have more hassle than help from this "smart" indent and want it turned off). Shouldn't there only be a single setting for this, to avoid such confusion?

For example when I paste the following:

1    The FA Cup
2    Capital One Cup

into Pycharm with *either* of the two settings enabled, it comes out as


Comment actions Permalink

I believe I saw similar behavior, but I can't figure out what I did to fix it. (might simply have been upgrading to v2016)  Try setting both to something else then back to what you want?

Even if that doesn't work, I found ctrl-shift-v works in a pinch bypassing any auto-formatting.

Comment actions Permalink

PyCharm is awesome but I must say this "Smart indent pasted lines" is not smart at all. The way it works is that with Reformat on Paste = None and Smart Indent Pasted Lines = True, you have to remember to tab to the column that you will want your pasted code to be at. This is such a pain, I really don't see what is smart about it. I finally turned it off, which then (with Reformat on Paste = None) pastes as-is. So if you copy a line that has 3 indent levels, and you paste on a line with your cursor 1 indent in, you would get that block at 4 indents for the first lines and whatever for the next lines. Not very useful, but if you now turn on the Reformat on Paste, it works nicely, i.e. as one would expect it to. 


Please sign in to leave a comment.