14

While I prefer tabs over spaces for indentation, I usually don't mind using spaces as this is often decided project-wide(or even company-wide) by powers out of my reach and the people also normally decide to intend by the reasonable 4 spaces.
However, now I am working on a project with 2 spaces indentation and oh boy, what a pain it is to write any nested code.. am I really the only one with this problem?

Comments
  • 2
    editorconfig.org
  • 4
    @torbuntu Bad, bad scanner…
  • 1
    Put these lines into your vimrc:

    set ts=2
    set sw=2
  • 1
    Or just indent however you want and do this before you commit:

    :%s/\t/ /g
  • 1
    4 spaces or 1 tab is the absolute minimum. 2 spaces is asking for trouble, and should be illegal.
  • 0
    I agree, I prefer 3 myself. But people rarely use it.
  • 0
    @ojrask how about three?
  • 2
    Using spaces instead of tabs is an accessibility nightmare. Do others a favor and just use tabs, please.
  • 0
    I actually prefer 2 over 4, I find 4 is too spread out. But hey, personal preference. Editors nowadays tend to sort it all out for you though, displaying whatever you prefer.
  • 0
    @Codex404 weird and rare, would need to try it and see if it is readable enough.
  • 0
    @ojrask yeah I don't see many people who use it, somehow people always choose even number of spaces. 2 is not enough and 4 takes to much space on a line.
  • 0
    I prefer 7 spaces.
Add Comment