kotlin-style-guide icon indicating copy to clipboard operation
kotlin-style-guide copied to clipboard

Consider using tabs instead of spaces for indentation

Open vlsi opened this issue 3 years ago • 0 comments
trafficstars

Tabs allow better accessibility:

  • if someone needs a larger indent (e.g. to recognize the code better), they can adjust tab width
  • tab consumes 1 slot on a refreshable braille display while 4 spaces consume 4

See https://github.com/prettier/prettier/issues/7475

On the other hand, the language is tuned for "4 space" indentation, so it would be nice to autoconfigure editors/viewers to "indent_size=4".

Just in case, GitHub recognizes .editorconfig indent_size = 4; indent_style = tab and it would render the file accordingly (see https://stackoverflow.com/a/33831598/1261287 )

vlsi avatar Jun 28 '22 15:06 vlsi