A plugin to add Silverstripe template support to PHPStorm and other JetBrains IDEs.
MIT License
This plugin adds Silverstripe template support to PHPStorm and other JetBrains IDEs.
This plugin requires PHPStorm (or other IDEA-based IDE) to be running version 2022.3 or greater.
It’s recommended to install the plugin via the JetBrains marketplace. Just search for “Silverstripe Template Language Support”, or use the following link:
Alternatively, the plugin can be installed from disk:
⋮
in PHPStorm).jar
file you downloaded<% include %>
statementsThe keyboard shortcuts referenced below are for MacOS - to check for your operating system, review the live templates documentation.
* These templates include placeholders for variables - simply type a variable, then press the return
key to continue.
The following live templates are available for completion - simply type the abbreviation and hit the TAB
key:
if
*elseif
*else
with
*loop
*cached
*inc
* - auto-suggests template includesreqcss
* - a <% require themedCSS() %>
tagreqjs
* - a <% require themedJavascript() %>
tagbase
- a <% base_tag %>
tag_t
* - a translation tagThe following live templates are available for surrounding existing code. Highlight a portion of your template, then press ⌥⌘J
to bring up the templates menu and select from the following:
if
* - surround with an if statementwith
* - surround with a "with" statementloop
* - surround with a loopcached
* - surround with a partial caching blockSee CONTRIBUTING.md for tips on getting the plugin to build.
I must send a huge thank you to Marcus Dalgren for his work on the original Silverstripe plugin. It has served Silverstripe developers perfectly for a number of years before it finally succumbed to the effects of many platform updates. It served as the inspiration for almost all the features in this version, and offered an excellent starting point for the JFlex lexer.
I also have to thank JetBrains for their open-source IntelliJ plugins, which have been an invaluable source of information on how to implement certain features.