|
| 1 | +# Space or Tabs? |
| 2 | +# https://stackoverflow.com/questions/35649847/objective-reasons-for-using-spaces-instead-of-tabs-for-indentation |
| 3 | +# https://stackoverflow.com/questions/12093748/how-to-use-tabs-instead-of-spaces-in-a-shell-script |
| 4 | +# https://github.com/editorconfig/editorconfig-defaults/blob/master/editorconfig-defaults.json |
| 5 | +# |
| 6 | +# 1. What happens when I press the Tab key in my text editor? |
| 7 | +# 2. What happens when I request my editor to indent one or more lines? |
| 8 | +# 3. What happens when I view a file containing U+0009 HORIZONTAL TAB characters? |
| 9 | +# |
| 10 | +# Answers: |
| 11 | +# |
| 12 | +# 1. Pressing the Tab key should indent the current line (or selected lines) one additional level. |
| 13 | +# 2. As a secondary alternative, I can also tolerate an editor that, |
| 14 | +# like Emacs, uses this key for a context-sensitive fix-my-indentation command. |
| 15 | +# 3. Indenting one or more lines should follow the reigning convention, if consensus is sufficiently strong; otherwise, |
| 16 | +# I greatly prefer 2-space indentation at each level. U+0009 characters should shift subsequent characters to the next tab stop. |
| 17 | +# |
1 | 18 | # Note: VIM users should use alternate marks [[[ and ]]] as the original ones can confuse nested substitutions, e.g.: ${${${VAR}}} |
2 | | -# # Space or Tabs? https://stackoverflow.com/questions/35649847/objective-reasons-for-using-spaces-instead-of-tabs-for-indentation |
| 19 | +# |
| 20 | +# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*- |
| 21 | +# vim: ft=zsh sw=2 ts=2 et |
3 | 22 |
|
4 | 23 | root = true |
5 | 24 |
|
6 | 25 | [*] |
| 26 | +charset = utf-8 |
7 | 27 | indent_style = space |
8 | 28 | indent_size = 2 |
9 | | -charset = utf-8 |
10 | | -end_of_line = lf |
11 | | -trim_trailing_whitespace = true |
12 | 29 | insert_final_newline = true |
| 30 | +trim_trailing_whitespace = true |
| 31 | + |
| 32 | +[*.sln] |
| 33 | +indent_style = tab |
13 | 34 |
|
14 | | -[**.{md,rst}] |
| 35 | +[*.{md,mdx,rst}] |
15 | 36 | trim_trailing_whitespace = false |
| 37 | + |
| 38 | +[*.{cmd,bat}] |
| 39 | +end_of_line = crlf |
| 40 | + |
| 41 | +[*za-*] |
| 42 | +end_of_line = lf |
| 43 | + |
| 44 | +[*.{sh,bash,zsh,fish}] |
| 45 | +end_of_line = lf |
| 46 | + |
| 47 | +[Makefile] |
| 48 | +indent_style = tab |
| 49 | +indent_size = 4 |
| 50 | + |
| 51 | +[*.{py,rb}] |
| 52 | +indent_size = 4 |
| 53 | + |
| 54 | +[*.{go,java,scala,groovy,kotlin}] |
| 55 | +indent_style = tab |
| 56 | +indent_size = 4 |
| 57 | + |
| 58 | +[*.{cs,csx,cake,vb,vbx}] |
| 59 | +# Default Severity for all .NET Code Style rules below |
| 60 | +dotnet_analyzer_diagnostic.severity = warning |
0 commit comments