Skip to content

Instantly share code, notes, and snippets.

@danielwrobert
Last active April 19, 2018 14:37
Show Gist options
  • Save danielwrobert/cdcb0887c0f5584464ee to your computer and use it in GitHub Desktop.
Save danielwrobert/cdcb0887c0f5584464ee to your computer and use it in GitHub Desktop.
My personal preferences for my EditorConfig file when working on a WordPress project. I save these contents to a .editorconfig file in my project's root directory. If you're not familiar with EditorConfig, you should check it out, it's pretty awesome - http://editorconfig.org/
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org
# WordPress Coding Standards
# https://make.wordpress.org/core/handbook/coding-standards/
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_size = 4
indent_style = tab
[*.yml]
indent_style = space
indent_size = 2
[*.md]
trim_trailing_whitespace = false
@danielwrobert
Copy link
Author

The only difference between this config file and the other one I have is that I've switched the indent_style to tabs to abide by the WordPress Coding Standards.

Creating a new Gist seems to save more time than adjusting the other one for every new project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment