82 points · by mojombo · 18y ago · 40 comments
I'm surprised I haven't heard any Python coders piping up. We pick spaces or tabs, and stick with it; otherwise, our code doesn't run. Mixing tabs and spaces is pure evil.
I prefer spaces, because a space is a space and will display as exactly one space in any text editor.
Because either indentation is a non-issue for you or you don't use Python.
Any decent editor solves this problem to the 98-99% mark. There's lots more interesting things to do than dick around with that 1-2%
Python forces you to keep your indentation correct and sane so it's never so whacked you need special tools to deal with it.
Proper indenting is subconscious like other languages ';' at end of line or parens around expressions in if/for. That is when it isn't automatically handled by your editor...
A better strategy that works just fine for a lot of developers (e.g. Linux kernel crowd) is to use tabs to indent the start of the line only. No tabs inside of the line, only spaces. Very simple and works really well.
edit: obviously I setup tab to insert 4 spaces etc
I don't understand your point about search regexps.
But you're right, this is a thing where I also see a big problem. It's not downward compatible.
i.e. if I paste something 3 times I end up with something like this:
Hello world
Hello world
Hello worldhttp://blog.macromates.com/2006/elastic-tabs/
Who else has noticed that textmate has stagnated from 2006-2008
one thing it doesn't do that looks REALLY appealing with elastic tabs is multi-tabbing, especially to appropriate spacing on multiline parameter lists. i'll add 'write a bundle to do this stuff' to the long list of projects that fall behind the startup.
PS. Make sure you have (setq-default indent-tabs-mode nil) somewhere in your .emacs
Honest question: Is that what emacs does?