-
Download
WordPress.xml
configuration file from this gist. -
Place into
.WebIdeXX/config/codestyles
in your user profile directory, differs by operating system. -
Select
Settings
>Project Settings
>Code Style
>Use global settings
>Scheme name
>"WordPress"
. -
Format via
Code
>Reformat Code...
in menu. -
Please vote for ticket WI-12040 WordPress coding style support to show support for PhpStorm having WordPress coding style ruleset out of the box!
-
-
Save pdewouters/5218055 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<code_scheme name="WordPress"> | |
<option name="USE_SAME_INDENTS" value="true" /> | |
<option name="IGNORE_SAME_INDENTS_FOR_LANGUAGES" value="true" /> | |
<option name="OTHER_INDENT_OPTIONS"> | |
<value> | |
<option name="INDENT_SIZE" value="2" /> | |
<option name="CONTINUATION_INDENT_SIZE" value="4" /> | |
<option name="TAB_SIZE" value="2" /> | |
<option name="USE_TAB_CHARACTER" value="true" /> | |
<option name="SMART_TABS" value="false" /> | |
<option name="LABEL_INDENT_SIZE" value="0" /> | |
<option name="LABEL_INDENT_ABSOLUTE" value="false" /> | |
<option name="USE_RELATIVE_INDENTS" value="false" /> | |
</value> | |
</option> | |
<option name="HTML_ATTRIBUTE_WRAP" value="0" /> | |
<option name="HTML_TEXT_WRAP" value="0" /> | |
<option name="HTML_SPACE_INSIDE_EMPTY_TAG" value="true" /> | |
<JSCodeStyleSettings> | |
<option name="ALIGN_OBJECT_PROPERTIES" value="2" /> | |
</JSCodeStyleSettings> | |
<PHPCodeStyleSettings> | |
<option name="ALIGN_KEY_VALUE_PAIRS" value="true" /> | |
<option name="ALIGN_PHPDOC_PARAM_NAMES" value="true" /> | |
<option name="ALIGN_PHPDOC_COMMENTS" value="true" /> | |
<option name="ALIGN_ASSIGNMENTS" value="true" /> | |
<option name="PHPDOC_BLANK_LINES_AROUND_PARAMETERS" value="true" /> | |
</PHPCodeStyleSettings> | |
<XML> | |
<option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" /> | |
</XML> | |
<codeStyleSettings language="CSS"> | |
<indentOptions> | |
<option name="INDENT_SIZE" value="2" /> | |
<option name="CONTINUATION_INDENT_SIZE" value="4" /> | |
<option name="TAB_SIZE" value="2" /> | |
<option name="USE_TAB_CHARACTER" value="true" /> | |
</indentOptions> | |
</codeStyleSettings> | |
<codeStyleSettings language="CoffeeScript"> | |
<indentOptions> | |
<option name="CONTINUATION_INDENT_SIZE" value="4" /> | |
<option name="USE_TAB_CHARACTER" value="true" /> | |
</indentOptions> | |
</codeStyleSettings> | |
<codeStyleSettings language="Gherkin"> | |
<indentOptions> | |
<option name="CONTINUATION_INDENT_SIZE" value="4" /> | |
<option name="TAB_SIZE" value="2" /> | |
<option name="USE_TAB_CHARACTER" value="true" /> | |
</indentOptions> | |
</codeStyleSettings> | |
<codeStyleSettings language="HTML"> | |
<indentOptions> | |
<option name="INDENT_SIZE" value="2" /> | |
<option name="CONTINUATION_INDENT_SIZE" value="4" /> | |
<option name="TAB_SIZE" value="2" /> | |
<option name="USE_TAB_CHARACTER" value="true" /> | |
</indentOptions> | |
</codeStyleSettings> | |
<codeStyleSettings language="JavaScript"> | |
<indentOptions> | |
<option name="INDENT_SIZE" value="2" /> | |
<option name="TAB_SIZE" value="2" /> | |
<option name="USE_TAB_CHARACTER" value="true" /> | |
</indentOptions> | |
</codeStyleSettings> | |
<codeStyleSettings language="LESS"> | |
<indentOptions> | |
<option name="CONTINUATION_INDENT_SIZE" value="4" /> | |
<option name="TAB_SIZE" value="2" /> | |
<option name="USE_TAB_CHARACTER" value="true" /> | |
</indentOptions> | |
</codeStyleSettings> | |
<codeStyleSettings language="PHP"> | |
<option name="CLASS_BRACE_STYLE" value="1" /> | |
<option name="METHOD_BRACE_STYLE" value="1" /> | |
<option name="ELSE_ON_NEW_LINE" value="true" /> | |
<option name="SPACE_AROUND_UNARY_OPERATOR" value="true" /> | |
<option name="SPACE_WITHIN_PARENTHESES" value="true" /> | |
<option name="SPACE_WITHIN_METHOD_CALL_PARENTHESES" value="true" /> | |
<option name="SPACE_WITHIN_METHOD_PARENTHESES" value="true" /> | |
<option name="SPACE_WITHIN_IF_PARENTHESES" value="true" /> | |
<option name="SPACE_WITHIN_WHILE_PARENTHESES" value="true" /> | |
<option name="SPACE_WITHIN_FOR_PARENTHESES" value="true" /> | |
<option name="SPACE_WITHIN_CATCH_PARENTHESES" value="true" /> | |
<option name="SPACE_WITHIN_SWITCH_PARENTHESES" value="true" /> | |
<option name="SPACE_WITHIN_ARRAY_INITIALIZER_BRACES" value="true" /> | |
<option name="SPACE_AFTER_TYPE_CAST" value="true" /> | |
<option name="DOWHILE_BRACE_FORCE" value="3" /> | |
<option name="WHILE_BRACE_FORCE" value="3" /> | |
<option name="FOR_BRACE_FORCE" value="3" /> | |
<indentOptions> | |
<option name="INDENT_SIZE" value="2" /> | |
<option name="TAB_SIZE" value="2" /> | |
<option name="USE_TAB_CHARACTER" value="true" /> | |
</indentOptions> | |
</codeStyleSettings> | |
<codeStyleSettings language="SCSS"> | |
<indentOptions> | |
<option name="CONTINUATION_INDENT_SIZE" value="4" /> | |
<option name="TAB_SIZE" value="2" /> | |
<option name="USE_TAB_CHARACTER" value="true" /> | |
</indentOptions> | |
</codeStyleSettings> | |
<codeStyleSettings language="SQL"> | |
<indentOptions> | |
<option name="CONTINUATION_INDENT_SIZE" value="4" /> | |
<option name="TAB_SIZE" value="2" /> | |
<option name="USE_TAB_CHARACTER" value="true" /> | |
</indentOptions> | |
</codeStyleSettings> | |
<codeStyleSettings language="XML"> | |
<indentOptions> | |
<option name="INDENT_SIZE" value="2" /> | |
<option name="CONTINUATION_INDENT_SIZE" value="4" /> | |
<option name="TAB_SIZE" value="2" /> | |
<option name="USE_TAB_CHARACTER" value="true" /> | |
</indentOptions> | |
</codeStyleSettings> | |
</code_scheme> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment