Reputation: 12027
Is there a way to tell IntelliJ to stop rewriting my code to match its preferences? I'm especially concerned with this when it comes to code that has already been committed to source control. For example, the following line was mysteriously changed to the second example because IntelliJ preferred the latter spacing.
assertLess((new Date().getTime()/1000)-8,attrs.mtime);
assertLess((new Date().getTime() / 1000) - 8, attrs.mtime);
I don't want this to happen. Any ideas?
Upvotes: 1
Views: 151
Reputation: 40438
There is an option in IDE Settings -> Editor -> Smart Keys named Reformat on Paste:
Check it is set to anything other than Reformat Block
, for example Indent Each Line
.
Upvotes: 1