How to paste code without reformating in IDEA

2019-02-03 21:15发布

I want to prevent Intellij IDEA from reformating my code when I paste it.
How can I do this?

P.S. It is needed because I can't customize code formatting for Erlang (ErlGray plugin)

3条回答
相关推荐>>
2楼-- · 2019-02-03 21:45

I found changing Reformat on Paste to None alone didn't work for me. I also had to untick "Smart indent pasted lines"

enter image description here

查看更多
唯我独甜
3楼-- · 2019-02-03 21:46

In the case anyone else comes across this and doesn't want to change their project-wide settings, I just recently found a "Paste Simple" command (Ctrl+Alt+Shift+V). I'm not sure what version it was added, but it's there as of IntelliJ 13.

查看更多
太酷不给撩
4楼-- · 2019-02-03 21:50

Set Settings (Preferences on Mac) | Editor | Smart Keys | Reformat on Paste to None:

reformat on paste

查看更多
登录 后发表回答