martin f krafft <madduck@xxxxxxxxxxx> wrote: > also sprach Eric Wong <normalperson@xxxxxxxx> [2007.07.14.1250 +0200]: > > This looks good and useful, but can I also have a shorthand "-s" for > > this, too? I'm lazy, thanks :) > > Of course. > > > Also, nitpicking, there's been some whitespace damage: > > > > I use tab characters for indentation, and (should be using) spaces for > > alignment. > > What's the difference? Or is it simply: > > no. of tabs: int(column / 8) > no. of spaces: column % 8 It's also easier/faster to navigate code with tabs since there are fewer characters to iterate over, less granular points for indentation, making it easier to to get to a desired indentation level. The less granularity with tabs means I can avoid situations where where I wonder if I'm correctly aligned with other pieces of code. I even have auto-indent set, but occasionally with spaces (when I work on Ruby code) I still have problems with being off-by-one after editing something. There's absolutely no way I can misalign a block of code when alignment granularity is 8 characters no matter how sleepy I get :) I use tabs for indentation where they denote logically different code paths / nesting. Spaces (for alignment, not indentation) are mainly aesthetic. I use them in spaces when I need finer control (usually long conditionals in if-statements that are wrapped). Tabs can also be easily reconfigured in editors to change the amount of screen real estate they consume. Not really useful in git-svn since I keep it <80 columns anyways. > I am sorry, I tried to do it right, even paid attention to the > tabs/spaces thing, but I guess I failed. No worries. The maintainers here are also very picky about trailing whitespace and spaces that appear before tab characters, too and I became much more disciplined about that myself the past year. I have highlighting search set in my editor (vim :set hls) and usually just search for spaces vs tabs to make sure I'm clean. Of course, maintaining a consistent whitespace style helps a *lot* with the git/Linux patch exchange development style because it avoids needless patch application conflicts that arise from whitespace differences. -- Eric Wong - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html