Skip to content

codepress/wp-phpstorm-settings

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHPStorm Settings

  1. Live Templates
  2. Coding Styles
  3. Code Inspections
  4. Keymaps
  5. File & Code Template

Live Templates

These are our custom WordPress live templates for PhpStorm. We have devided them in two groups:

  • PHP templates/php.xml
  • WordPress templates/wordpress.xml

Usage

  • Download the files php.xml and wordpress.xml
  • Copy them to ~/Library/Application Support/JetBrains/PhpStorm20{x}.{x}/templates directory.
  • Restart PhpStorm.
  • The two groups 'PHP' and WordPress' will be activated by default. Disable any group or live template from PHPStorm Preferences > Editor > Live Templates.
  • A list of available abbreviations that will trigger a live template can be found by selecting 'PHP' or WordPress' in PHPStorm Preferences > Editor > Live Templates.

Coding Styles

This is our own WordPress coding styles for PhpStorm, forked from the WordPress.xml packaged with PhpStorm

Usage

  • Download the codestyles/CodepressWordPress.xml file.
  • Copy it to ~/Library/Application Support/JetBrains/PhpStorm20{x}.{x}/codestyles directory.
  • Activate the scheme by selecting it in PHPStorm Preferences > Editor > Code Style.

Code Inspections

This is our own WordPress code inspections format for PhpStorm

Usage

  • Download the inspection/Codepress.xml file.
  • Copy it to ~/Library/Application Support/JetBrains/PhpStorm20{x}.{x}/inspection directory.
  • Activate the scheme by selecting 'Codepress' in PHPStorm Preferences > Editor > Inspections.

Keymaps

This are our own PHP keymaps for PhpStorm taken from the Laracasts series

Usage

  • Download the keymaps/Laracasts.xml file.
  • Copy it to ~/Library/Application Support/JetBrains/PhpStorm20{x}.{x}/keymaps directory.
  • Activate the keymap by selecting 'Laracasts' in PHPStorm Preferences > Keymap.

File and Code Templates

This are our own PHP File templates for PhpStorm.

Usage

  • Download the content of the fileTemplates directory.
  • Copy it to ~/Library/Application Support/JetBrains/PhpStorm20{x}.{x}/fileTemplates directory.
  • Restart PhpStorm.

Development

  • Clone the repo.

  • Symlink the file to the ~/Library/Application Support/JetBrains/PhpStorm20{x}.{x}/<directory> directory:

     $ cd ~/Library/Preferences/PhpStorm{xx}/<directory>
     $ ln -s /<path_to_repo>/<filename>.xml
    
  • Restart PhpStorm.

  • Make changes, submit pull requests etc.

Releases

No releases published

Packages

No packages published

Languages