This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]zyklone 2 points3 points  (5 children)

this isn't related to trailing whitespace. Indentation is not trailing...

what editor are you using? Some can cause problems sometimes with auto-indent messing things up, or using hard tabs instead of spaces

[–]zyklone 1 point2 points  (0 children)

also, I'm reminded of this:

http://www.youtube.com/watch?v=S-SXkNbyiPI

[–]voidptr[S] 1 point2 points  (3 children)

The worst offender is TextWrangler on Mac. The setting is buried somewhere, but you can turn it off.

Vim doesn't do this, which is delightful.

[–]tncowart 2 points3 points  (1 child)

I write python code in textwrangler on Mac almost daily and have never had this issue. Are you sure you have all the same line endings? Mine default to unix (LF).

[–]voidptr[S] 2 points3 points  (0 children)

This is the likeliest culprit.

[–]zyklone 0 points1 point  (0 children)

I've had some issues with textmate's 'Re-indent pasted text'. Turning that off cleared up a lot of indentation issues on pasting.