Skip to content
This repository has been archived by the owner on Feb 19, 2019. It is now read-only.

[Enhancement] Add EditorConfig file denoting coding style. #123

Closed
wants to merge 1 commit into from

Conversation

xuhdev
Copy link
Contributor

@xuhdev xuhdev commented Jul 7, 2012

The .editorconfig file defines indentation styles for all the PowerShell files.

EditorConfig is a project that defines coding style and makes editors format the code in a consistent way, especially the indentation. It's available for many editors and IDEs, including Notepad++, Visual Studio. Many projects have taken advantages of it, including jQuery, Modernizr.

I made this pull request because the Chocolatey code is very clean now, and I wish people can utilize this file to keep the coding style consistent when they contribute code.

According to the tutorial video, I think Notepad++ may be used a lot in this project? The EditorConfig Notepad++ plugin is available on the plugin manager. And also, there is a Visual Studio plugin has its binary installer on the Visual Studio Galley, so it's very easy to install.

What do you think about this?

@ferventcoder
Copy link
Contributor

We may need to talk about his some more. Never heard of it before...

@xuhdev
Copy link
Contributor Author

xuhdev commented Jul 9, 2012

EditorConfig is made of plugins for many editors, and a definition of a file format defing the coding style. For example, with the .editorconfig file in the pull request, when you open a powershell file in notepad++, for example, the notepad++ will automatically set the indent option to space and indent size to two for this buffer. Thus when Notepad++ does indent for you, or when you press tab, two spaces will be inserted, but not tab, or four spaces, or anything else. Also, the eol is set to CRLF.

EditorConfig has got its popularity through out web developers. As I mentioned, a few famous web projects, such as jQuery, Modernizr, has used EditorConfig to maintain coding style. But we really think this project can bring benefits to projects other than web projects, since a consistent coding style is important for every code.

FYI, a development library for plugins is also available on chocolatey :)

@xuhdev
Copy link
Contributor Author

xuhdev commented Jul 9, 2012

Note that the plugin doesn't affect global editor preferences, but only buffer options.

@ferventcoder
Copy link
Contributor

I think we'll likely pull this in... :D

@xuhdev
Copy link
Contributor Author

xuhdev commented Jul 12, 2012

:) Wish you like it

@ghost ghost assigned ferventcoder Aug 8, 2012
@ferventcoder
Copy link
Contributor

This is in. Thanks for the contribution!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants