Paste without auto-formatting


I'm working with some complicated code that is indented the way the previous developer liked it, which is adequate to work with, but if I copy and paste a section, it auto-formats it completely changing the indentation and line breaks, making it hard to compare sections for new changes.

How do I stop this? I want a literal exact copy-and-paste and only auto-formatting if I manually do it through my hotkeys.

Comment actions Permalink

Settings/Preferences | Editor | General | Smart Keys --> Reformat on Paste

Also/Alternative: "Edit | Paste Simple" -- should just paste without any additional auto-actions/improvements on top

Comment actions Permalink

As Andriy mentioned, 'Paste simple', whose hotkey is 'Ctrl+Alt+Shift+V', will preserve the literal whitespace and formatting of the pasted text. That's what I use in these cases.

Comment actions Permalink

I want to turn it on. Can't find "Settings/Preferences | Editor | General | Smart Keys --> Reformat on Paste"

Comment actions Permalink

@David Yost

Try search field -- it helps narrowing the stuff a lot:


"Help | Find Action..." (Ctrl+Shift+A on Windows using Default keymap) also allows to locate that option even from Welcome screen:


Please sign in to leave a comment.