Open scripting opened 7 years ago
✋ I typically use 2 spaces for indention. I configure it in my editor, and never think about it again.
It depends on what language you're using and what editor. For example, Python says "Spaces are the preferred indentation method." ref.
You can easily make your editor insert the correct number of spaces when you hit TAB.
4, unless there are local conventions for something else (e.g., Drupal uses two-space indents).
I also use 4 spaces.
When I write javascript I try to adhere to Douglas Crockford's Code Conventions for the JavaScript Programming Language.
It's been a long time since I've read Crockford's conventions. I've adopted many of them, but I disagree with some of his points.
I'm ambivalent re code indenting, spaces v tabs.
But, if you are going to do it with spaces, how many spaces should one use??