When you paste copied code with CTRL+V
, RubyMine will change the indentation of the pasted code. You can prevent this by pasting with CTRL+ALT+Shift+V
instead ("Paste Simple").
To change this behavior entirely, you can open your settings and navigate to Editor / General / Smart Keys
. Here you can select one of three options for Reformat on paste
:
You might want to try "Indent Block".