On 4 January 2012 16:34, ThomasK <nongnu....@sce-gbr.de> wrote: > Hi, > > I've commited now a script to count all tab spaces from source files in > simulavr workspace. Goal is to reduce step by step tab spaces from source > files.
Are you aware that spaces-vs-tabs issue is a holy war which has been going on for decades and remains unsolved? It is unlikely that anyone finds a solution people would like. Maybe if the solution was implemented in an editor. > > Why? Usually developers use different editors, as they like. And also > different settings. And one of such setting is the size of tab space. So a > good indented (and readable and understandable!) source code on one > developer look terrible for an other. AND this guy will start changing the > indentation again. The result is: we get changes only in whitespace! If this > guy makes at first such changes and commit this (and write this also in > commit comment!), then it's easy to filter. But this isn't so in every case > and it's more hard to review changes, more hard to maintain code and to > understand it and so one. (sure, there are reasons for tab's but not for > using indentation by tab space character!) > > So, it's better to use SOFT-Tabs! Simulavr uses for this a tab space of 4 > characters. What is SOFT-Tabs? Indenting using 4 spaces? (If yes, then it is indentation using spaces, not soft-tabs.) There are reasons for tabs for indentation. Selecting text is more precise/faster and navigating using cursor keys is faster. Everyone gets the visual amount of indentation they prefer. The formating using spaces will not look horrible on other person's editor - if the author used tabs correctly. They call it SmartTabs, it seems. http://www.emacswiki.org/emacs/SmartTabs I think it is lame to commit changes which only change whitespace. Possible exception is to change few lines that are inconsistent with lines immediately above and below. I try to avoid changing indentation while changing code. Sometimes I slip. -- Petr Hluzin _______________________________________________ Simulavr-devel mailing list Simulavr-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/simulavr-devel