-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Setup .editorconfig #1082
Setup .editorconfig #1082
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I personally use tabs for indentation on my projects so different developers can use any number of character widths that they want for indentation. I worked with a guy in college who was almost blind and preferred 8 character indentation. Thankfully we used tabs on all of our projects so I didn't need to stare at all of that whitespace in my editor.
I prefer 2 character width indentation and I work on quite a few projects that use spaces so it really doesn't matter to me. (I use the tab key for indentation anyway and let my editor figure out if it should put spaces or tabs in)
@UziTech: "Let the editor figure it out" - agreed...that's why I fell in love with I have a project that is a blend or PHP, JS, Sass, and so on. PHP uses spaces not tabs - four spaces for each (if you are following the PHP-fig coding standards, which is common for the community). The JS and CSS communities seem more inclined to 2. As long as contributors use an editor that understands them, everyone is doing the same thing without having to wait for the linter to tell them they're wrong. 😆 So, yeah, |
.editorconfig
Outdated
indent_style = space | ||
indent_size = 2 | ||
|
||
[*.md] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't impose rules on markdown files because we use them to make tests, and sometimes we want to break out of all these rules. Is there a way to apply this only to documentation files?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. This could cause problems if it is not limited the docs.
Maybe remove this check for *.md and it can be added when we create a /docs
folder with GitHub Pages.
Personally I use tabs for indentation with 4 spaces width (or 2 spaces width for javascript most of the time) but it doesn't really matter to me either. The beauty is that if you use tabs in
|
.editorconfig
Outdated
indent_style = space | ||
indent_size = 2 | ||
|
||
[*.md] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. This could cause problems if it is not limited the docs.
Maybe remove this check for *.md and it can be added when we create a /docs
folder with GitHub Pages.
Note: you need a plugin to have this working in SublimeText, Atom, Emacs, gedit, Eclipse, Notepad++, Vim, VSCode and others. |
Also, should we include a brief "coding style" section in our "contributing" documentation (be it in README on in some other file)? |
Agreed on the markdown believe we can do exclude...will resubmit shortly. Also agreed on the needing a plug-in in most cases (vendors not supporting it natively); however, we don't even have the option to support it right now. :) I was first introduced to it only a couple of years ago and now I don't leave home without it. 😉 https://github.com/editorconfig/editorconfig/wiki/Projects-Using-EditorConfig - It's gaining traction in a lot of projects I trust - especially the A11Y. |
Also, found out the VIM can't support it period while working #1083 - so, I've updated #1081 with a checkpoint to run See also #1089 - just created it. |
Marked version: 0.3.16
Proposal type: project operations
What pain point are you perceiving?
Tabs are rendered as literal tab characters, not spaces using Sublime Text 3.
Was working on #1076 and noticed the code samples were rendering funny when it came to whitespace and text wrapping. Realized it was because my editor was using literal tabs instead of spaces.
What solution are you suggesting?
A
.editorconfig
file following similar rules as lint options...specifically, spaces not tabs.See also http://editorconfig.org
Could be accepted before or after #1076