2 Spaces or 1 Tab, what's the standard for indentation in the Rails Community?

前端 未结 7 583
Happy的楠姐
Happy的楠姐 2021-02-01 14:36

I\'ve noticed that most of the HTML/XML/HAML that gets generated from plugins uses 2 spaces instead of 1 tab. I use textmate and have tabs set to 4 spaces for HAML/HTML/XML and

7条回答
  •  借酒劲吻你
    2021-02-01 15:08

    As for all the arguments about different editors showing tabs with different widths...

    It is a configuration setting people!

    Change your editors to use two spaces for each tab. Different widths in different editors is not an argument. It is a moot point. If anything, using tabs allows people who prefer different widths to set and use the width they prefer. Hell, I think I like 3 spaces.

    And you have to hit backspace twice just to un-indent something once. I'm a programmer, I'm lazy. I don't like to do things more than once!

提交回复
热议问题