8

From now on, I'll be using soft tabs. I didn't know editors can help me with this before. I thought all I see are hard tabs. Am I on the right path?

Comments
  • 1
    Yes, I have been using the google c++ style guide. Here is what it says:
    Spaces vs. Tabs

    Use only spaces, and indent 2 spaces at a time.

    We use spaces for indentation. Do not use tabs in your code. You should set your editor to emit spaces when you hit the tab key.
  • 1
    I used to be a tabs guy years ago, but have converted to 4 spaces for most languages, 2 for javascript.

    Not because I have a strong opinion on it, but because most projects use whitespace like that.

    I think js devs will eventually switch to 4 spaces as well, when promises become more common than callback closures.

    The most important rule is: use your team's style uniformly throughout the project, and don't fight about it.

    And yeah, any good editor / IDE should be able to help you autoindent your code in the right style.
  • 0
    I use soft 4-spaced tabs
  • 0
Add Comment