This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Formatting, tabs vs spaces.


On Wed, Jul 16, 2008 at 7:28 AM, Chris Fairles <chris.fairles@gmail.com> wrote:
> I've always been using 2 spaces instead of a tab character and setting
> my tab width to 2. However, it seems that perhaps this isn't the norm?
> For example, in the last commit that "fixed" time_point's indentation
> shows up like this in some editors (like vim, my editor of choice, and
> other gui editors that I use)
>
>    template<typename... etc>
>      struct time_point
>      {
>  typedef _Clock...
>  typedef _Duration.. etc
>
>
> i.e. the class contents here are only indented by what looks like 2
> spaces but really its a single tab char and since my tab width is set
> to 2, it doesn't display correctly. Should there not be 3 tab chars
> here? or 6 spaces? Should I be using tab chars instead of spaces?
>
> Chris
>

I should also add that I suggest we stick to spaces for tabs since we
enforce a strict 2-space indentation and spaces are editor-agnostic.
By using tabs, developers are at the mercy of whatever their tab width
is set to and if its not 2, everything will display incorrectly.

Chris


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]