In Xcode 4, I'm having a problem with leading white space (it's being trimmed), when copy and pasting between files. In the hex dump, I see 0x20
s in the source, but not in the copy; this means the text is being changed on paste.
In preferences > text editing > indentation
, I have prefer indent using: spaces
and tab key: indents in leading white space
set.
This doesn't happen on trailing whitespace. How can I fix this problem?
Use Keyboard Shortcuts On Windows, you can use the combination Ctrl + Shift + V to paste without formatting in several major programs, such as Google Chrome.
Method 1: Add a shiftEvery time. On some — but not all — apps, when you press Ctrl-V (Win)/Cmd-V (Mac), you can press Shift too. This activates “Paste and Match Style”, which converts the text to the same style as the destination document. This is usually what you want.
In that same Preferences > Text Editing > Indentation screen, try unchecking the Syntax-aware indenting option.
You can try to use Edit > Paste and Preserve Formatting in Xcode. I can see it in version 5.1 but can't tell if it was there before. There is a keyboard combination for it, too: Alt+Caps+Command+C.
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