I like the auto-indentation in XCode 4 when coding/typing, but I want to disable this function when I'm pasting the code. So is there a way to have separate settings for the two situations?
Choose Xcode > Preferences… from the menu bar (default shortcut: command-comma). Then click the “Text Editing” section. Then choose the “Indentation” tab.
Xcode tip #21: If you've copied code from elsewhere, such as Hacking with Swift or Stack Overflow, there's a good chance you'll paste in something with incorrect indentation. Xcode can fix this with one shortcut: select the code you want to fix, then press Ctrl+I to reindent it.
vim" in 'runtimepath'. This disables auto-indenting for files you will open. It will keep working in already opened files. Reset 'autoindent', 'cindent', 'smartindent' and/or 'indentexpr' to disable indenting in an opened file.
Instead of using a normal paste, use "Paste and Preserve Formatting". It's in the Edit menu, and its shortcut is "Alt+Shift+Cmd+V".
You can enable or disable in Xcode 11
Xcode > Preferences > Text Editing > switch to Re-indent on paste
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With