Tabs are EVIL *and* STUPID, end of discussion. (Re: Tabs versus Spaces in Source Code)
Edward Elliott
nobody at 127.0.0.1
Wed May 17 13:28:26 EDT 2006
Sybren Stuvel wrote:
> Andy Sy enlightened us with:
>> Like I said, you'll *NEVER* get that fancy shmancy 'semantic
>> indentation' idea to work properly in the most basic utilities which
>> have the 8-space tabs assumption hardcoded in them.
>
> Fair enough. How much code is viewed with less and cat, and how much
> is viewed using smart viewers/editors? I think the majority is viewed
> using the latter.
Just for the sake of completeness:
cat file |sed 's/\t/ /g'
less -x4 file
vim ~/bin.cat
#!/bin/sh
cat "$@" |sed 's/\t/ /g'
:wq
alias less='less -x4'
--
Edward Elliott
UC Berkeley School of Law (Boalt Hall)
complangpython at eddeye dot net
More information about the Python-list
mailing list