Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android studio prevent code reformatting on paste [duplicate]

I've started using Android Studio (replacing Eclipse) and one thing I just can't get used to is how Studio automatically (under certain circumstances) reformats some or even all of my code in the current file. One of those circumstances is pasting text into my file. when I do that, the entire block gets reformatted according to the arcane rules I can format (but seriously do not like) in the Settings.

Is there a check box somewhere in the settings that turns this off??

I can format my own code easily enough, and since I can also manually tell Studio to "do it now", there doesn't seem to be any reason to put up with all the automatic hand-holding.

like image 611
Rich Avatar asked May 27 '15 15:05

Rich


1 Answers

You can stop it by setting the Reformat on paste option to none to None. You can find the option under Editor -> General -> Smart Keys. See the image

enter image description here

You can temporary disable reformat by pasting the code by pressing Ctrl + Alt + Shift + V

Alternatly you can right click on where you want to paste the code and then click Paste simple

enter image description here

like image 97
Bojan Kseneman Avatar answered Nov 15 '22 01:11

Bojan Kseneman