In Ubuntu 14.04: Copy CodingStandard.xml file to PHPStorm directory
$ cp CodingStandard.xml /home/user/.WebIde90/config/codestyles/CodingStandard.xml
- In the Code Style page, select the desired scheme from the drop-down list, and click Manage.
- In the Code Style Schemes dialog box that opens, click Save As....
- In the Save Code Style Scheme As dialog box, type the name of the new scheme. WebStorm saves the new code style with the specified name in the config/codestyles/<code_style_name>.xml file under the WebStorm home directory.
- Close the Code Style Schemes dialog box, and apply changes.
- In the project tool window, select module or directory to which you want to apply your reformatting.
- From the main menu, select Code | Reformat Code or press Ctrl+Alt+L. Alternatively, in the project tool window, right-click the directory and from the context menu, select Reformat Code.
- In the Reformat Code dialog box, specify the necessary options and filters for you reformatting and click Run.
- In the editor of the currently opened file, press Ctrl+Shift+Alt+L. Note that if you select Code | Reformat Code from the main menu or press Ctrl+Alt+L, PhpStorm will try to reformat the source code automatically without opening the Reformat File dialog.
- In the Reformat File dialog, specify options for the reformatting and click Run.
1.0