Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't set indent_size when using tabs #1916

Merged
merged 1 commit into from
Aug 15, 2021

Conversation

gaelicWizard
Copy link
Contributor

@gaelicWizard gaelicWizard commented Aug 13, 2021

Description

indent_size should be set to tab, and tab_width should be set to the desired indentation distance. However, tab_width is a deeply personal religious conviction and should not be set by a shared community project.

Motivation and Context

It's possible someone forces tab_width to 8 and then their editor may half-tab by using spaces of indent_size...which is somehow worse than always using tabs or always using spaces...

How Has This Been Tested?

I've never used .editorconfig before, but I installed the TextMate plugin.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code follows the code style of this project.
  • If my change requires a change to the documentation, I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • If I have added a new file, I also added it to clean_files.txt and formatted it using lint_clean_files.sh.
  • I have added tests to cover my changes, and all the new and existing tests pass.

@gaelicWizard gaelicWizard marked this pull request as draft August 13, 2021 05:35
@gaelicWizard gaelicWizard marked this pull request as ready for review August 13, 2021 05:39
Copy link
Member

@NoahGorny NoahGorny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair point, approved!

When using tabs, `indent_size` should be set to `tab`, which is the default. Furthermore, `tab_width` (which is likely what was intended when `indent_size` was entered) should be left up to the user. If the user likes an 8-character indent, then let them. If they like 2-character indent size, then let them. Using tabs means that this all works normally for everyone, even if it's different on different screens.
@NoahGorny NoahGorny merged commit 907fa1d into Bash-it:master Aug 15, 2021
@gaelicWizard gaelicWizard deleted the EditorConfig branch August 22, 2021 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants