Skip to content

Instantly share code, notes, and snippets.

@oliverthiele
Created November 30, 2017 11:01
Show Gist options
  • Save oliverthiele/43b098c44b1b6e29b4f2fed6da1cf486 to your computer and use it in GitHub Desktop.
Save oliverthiele/43b098c44b1b6e29b4f2fed6da1cf486 to your computer and use it in GitHub Desktop.
PhpStorm Live Templates for *.rst files
<templateSet group="RST">
<template name="rstRefCoreApi" value=":ref:`Core Api Reference &lt;t3coreapi:$SECTION$&gt;`" description="Core Api Reference" toReformat="false" toShortenFQNames="true">
<variable name="SECTION" expression="" defaultValue="start" alwaysStopAt="true" />
<context>
<option name="Bash" value="false" />
<option name="CSS" value="false" />
<option name="CUCUMBER_FEATURE_FILE" value="false" />
<option name="CoffeeScript" value="false" />
<option name="HAML" value="false" />
<option name="HTML" value="false" />
<option name="JAVA_SCRIPT" value="false" />
<option name="JSON" value="false" />
<option name="OTHER" value="true" />
<option name="PHP" value="false" />
<option name="SQL" value="false" />
<option name="Twig" value="false" />
<option name="TypeScript" value="false" />
<option name="Vue" value="false" />
<option name="XML" value="false" />
</context>
</template>
<template name="rstCodeBlock" value=".. code-block:: $LANGUAGE$&#10; &#10; $END$" description="Code Block" toReformat="false" toShortenFQNames="true">
<variable name="LANGUAGE" expression="" defaultValue="php" alwaysStopAt="true" />
<context>
<option name="Bash" value="false" />
<option name="CSS" value="false" />
<option name="CUCUMBER_FEATURE_FILE" value="false" />
<option name="CoffeeScript" value="false" />
<option name="HAML" value="false" />
<option name="HTML" value="false" />
<option name="JAVA_SCRIPT" value="false" />
<option name="JSON" value="false" />
<option name="OTHER" value="true" />
<option name="PHP" value="false" />
<option name="SQL" value="false" />
<option name="Twig" value="false" />
<option name="TypeScript" value="false" />
<option name="Vue" value="false" />
<option name="XML" value="false" />
</context>
</template>
<template name="rstFile" value=":file:`$SELECTION$`" description="Filename or Directory" toReformat="false" toShortenFQNames="true">
<context>
<option name="Bash" value="false" />
<option name="CSS" value="false" />
<option name="CUCUMBER_FEATURE_FILE" value="false" />
<option name="CoffeeScript" value="false" />
<option name="HAML" value="false" />
<option name="HTML" value="false" />
<option name="JAVA_SCRIPT" value="false" />
<option name="JSON" value="false" />
<option name="OTHER" value="true" />
<option name="PHP" value="false" />
<option name="SQL" value="false" />
<option name="Twig" value="false" />
<option name="TypeScript" value="false" />
<option name="Vue" value="false" />
<option name="XML" value="false" />
</context>
</template>
<template name="rstFigure" value=".. figure:: $PATH$&#10; :alt: $ALT$&#10; :align: center&#10; :class: with-border&#10;&#10; Figure $ID$: $FIGCAPTION$&#10;&#10;$END$" description="Figure" toReformat="false" toShortenFQNames="true">
<variable name="PATH" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="ALT" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="ID" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="FIGCAPTION" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="Bash" value="false" />
<option name="CSS" value="false" />
<option name="CUCUMBER_FEATURE_FILE" value="false" />
<option name="CoffeeScript" value="false" />
<option name="HAML" value="false" />
<option name="HTML" value="false" />
<option name="JAVA_SCRIPT" value="false" />
<option name="JSON" value="false" />
<option name="OTHER" value="true" />
<option name="PHP" value="false" />
<option name="SQL" value="false" />
<option name="Twig" value="false" />
<option name="TypeScript" value="false" />
<option name="Vue" value="false" />
<option name="XML" value="false" />
</context>
</template>
<template name="rstPhp" value=":php:`$SELECTION$`" description="PHP String" toReformat="false" toShortenFQNames="true">
<context>
<option name="Bash" value="false" />
<option name="CSS" value="false" />
<option name="CUCUMBER_FEATURE_FILE" value="false" />
<option name="CoffeeScript" value="false" />
<option name="HAML" value="false" />
<option name="HTML" value="false" />
<option name="JAVA_SCRIPT" value="false" />
<option name="JSON" value="false" />
<option name="OTHER" value="true" />
<option name="PHP" value="false" />
<option name="SQL" value="false" />
<option name="Twig" value="false" />
<option name="TypeScript" value="false" />
<option name="Vue" value="false" />
<option name="XML" value="false" />
</context>
</template>
<template name="rstBoxNote" value=".. note::&#10;&#10; $END$" description="Note" toReformat="false" toShortenFQNames="true">
<context>
<option name="Bash" value="false" />
<option name="CSS" value="false" />
<option name="CUCUMBER_FEATURE_FILE" value="false" />
<option name="CoffeeScript" value="false" />
<option name="HAML" value="false" />
<option name="HTML" value="false" />
<option name="JAVA_SCRIPT" value="false" />
<option name="JSON" value="false" />
<option name="OTHER" value="true" />
<option name="PHP" value="false" />
<option name="SQL" value="false" />
<option name="Twig" value="false" />
<option name="TypeScript" value="false" />
<option name="Vue" value="false" />
<option name="XML" value="false" />
</context>
</template>
<template name="rstCodeBlockFull" value=".. code-block:: $LANGUAGE$&#10; :caption: $FILENAME$&#10; :name: $NAME$&#10; &#10; $END$" description="Code Block" toReformat="false" toShortenFQNames="true">
<variable name="LANGUAGE" expression="" defaultValue="php" alwaysStopAt="true" />
<variable name="FILENAME" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="NAME" expression="lowercaseAndDash(String)" defaultValue="" alwaysStopAt="true" />
<context>
<option name="Bash" value="false" />
<option name="CSS" value="false" />
<option name="CUCUMBER_FEATURE_FILE" value="false" />
<option name="CoffeeScript" value="false" />
<option name="HAML" value="false" />
<option name="HTML" value="false" />
<option name="JAVA_SCRIPT" value="false" />
<option name="JSON" value="false" />
<option name="OTHER" value="true" />
<option name="PHP" value="false" />
<option name="SQL" value="false" />
<option name="Twig" value="false" />
<option name="TypeScript" value="false" />
<option name="Vue" value="false" />
<option name="XML" value="false" />
</context>
</template>
<template name="rstRefTca" value=":ref:`TCA Reference &lt;t3tca:$SECTION$&gt;`&#10;" description="TCA Reference" toReformat="false" toShortenFQNames="true">
<variable name="SECTION" expression="" defaultValue="start" alwaysStopAt="true" />
<context>
<option name="Bash" value="false" />
<option name="CSS" value="false" />
<option name="CUCUMBER_FEATURE_FILE" value="false" />
<option name="CoffeeScript" value="false" />
<option name="HAML" value="false" />
<option name="HTML" value="false" />
<option name="JAVA_SCRIPT" value="false" />
<option name="JSON" value="false" />
<option name="OTHER" value="true" />
<option name="PHP" value="false" />
<option name="SQL" value="false" />
<option name="Twig" value="false" />
<option name="TypeScript" value="false" />
<option name="Vue" value="false" />
<option name="XML" value="false" />
</context>
</template>
<template name="rstTocTree" value=".. toctree::&#10; :maxdepth: 2&#10; &#10; $END$" description="rstTocTree" toReformat="false" toShortenFQNames="true">
<context>
<option name="Bash" value="false" />
<option name="CSS" value="false" />
<option name="CUCUMBER_FEATURE_FILE" value="false" />
<option name="CoffeeScript" value="false" />
<option name="HAML" value="false" />
<option name="HTML" value="false" />
<option name="JAVA_SCRIPT" value="false" />
<option name="JSON" value="false" />
<option name="OTHER" value="true" />
<option name="PHP" value="false" />
<option name="SQL" value="false" />
<option name="Twig" value="false" />
<option name="TypeScript" value="false" />
<option name="Vue" value="false" />
<option name="XML" value="false" />
</context>
</template>
<template name="rstBoxTip" value=".. tip::&#10;&#10; $END$" description="Tip" toReformat="false" toShortenFQNames="true">
<context>
<option name="Bash" value="false" />
<option name="CSS" value="false" />
<option name="CUCUMBER_FEATURE_FILE" value="false" />
<option name="CoffeeScript" value="false" />
<option name="HAML" value="false" />
<option name="HTML" value="false" />
<option name="JAVA_SCRIPT" value="false" />
<option name="JSON" value="false" />
<option name="OTHER" value="true" />
<option name="PHP" value="false" />
<option name="SQL" value="false" />
<option name="Twig" value="false" />
<option name="TypeScript" value="false" />
<option name="Vue" value="false" />
<option name="XML" value="false" />
</context>
</template>
<template name="rstBoxSidebar" value=".. sidebar:: $HEADER$&#10; &#10; $END$" description="Sidebar" toReformat="false" toShortenFQNames="true">
<variable name="HEADER" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="Bash" value="false" />
<option name="CSS" value="false" />
<option name="CUCUMBER_FEATURE_FILE" value="false" />
<option name="CoffeeScript" value="false" />
<option name="HAML" value="false" />
<option name="HTML" value="false" />
<option name="JAVA_SCRIPT" value="false" />
<option name="JSON" value="false" />
<option name="OTHER" value="true" />
<option name="PHP" value="false" />
<option name="SQL" value="false" />
<option name="Twig" value="false" />
<option name="TypeScript" value="false" />
<option name="Vue" value="false" />
<option name="XML" value="false" />
</context>
</template>
<template name="rstBoxWarning" value=".. warning::&#10;&#10; $END$" description="Warning" toReformat="false" toShortenFQNames="true">
<context>
<option name="Bash" value="false" />
<option name="CSS" value="false" />
<option name="CUCUMBER_FEATURE_FILE" value="false" />
<option name="CoffeeScript" value="false" />
<option name="HAML" value="false" />
<option name="HTML" value="false" />
<option name="JAVA_SCRIPT" value="false" />
<option name="JSON" value="false" />
<option name="OTHER" value="true" />
<option name="PHP" value="false" />
<option name="SQL" value="false" />
<option name="Twig" value="false" />
<option name="TypeScript" value="false" />
<option name="Vue" value="false" />
<option name="XML" value="false" />
</context>
</template>
<template name="rstHtml" value=":typoscript:`$SELECTION$`" description="HTML Code" toReformat="false" toShortenFQNames="true">
<context>
<option name="Bash" value="false" />
<option name="CSS" value="false" />
<option name="CUCUMBER_FEATURE_FILE" value="false" />
<option name="CoffeeScript" value="false" />
<option name="HAML" value="false" />
<option name="HTML" value="false" />
<option name="JAVA_SCRIPT" value="false" />
<option name="JSON" value="false" />
<option name="OTHER" value="true" />
<option name="PHP" value="false" />
<option name="SQL" value="false" />
<option name="Twig" value="false" />
<option name="TypeScript" value="false" />
<option name="Vue" value="false" />
<option name="XML" value="false" />
</context>
</template>
<template name="rstAspect" value=":aspect:`$SELECTION$`" description="Aspect" toReformat="false" toShortenFQNames="true">
<context>
<option name="Bash" value="false" />
<option name="CSS" value="false" />
<option name="CUCUMBER_FEATURE_FILE" value="false" />
<option name="CoffeeScript" value="false" />
<option name="HAML" value="false" />
<option name="HTML" value="false" />
<option name="JAVA_SCRIPT" value="false" />
<option name="JSON" value="false" />
<option name="OTHER" value="true" />
<option name="PHP" value="false" />
<option name="SQL" value="false" />
<option name="Twig" value="false" />
<option name="TypeScript" value="false" />
<option name="Vue" value="false" />
<option name="XML" value="false" />
</context>
</template>
<template name="rstJs" value=":js:`$SELECTION$`" description="Js" toReformat="false" toShortenFQNames="true">
<context>
<option name="Bash" value="false" />
<option name="CSS" value="false" />
<option name="CUCUMBER_FEATURE_FILE" value="false" />
<option name="CoffeeScript" value="false" />
<option name="HAML" value="false" />
<option name="HTML" value="false" />
<option name="JAVA_SCRIPT" value="false" />
<option name="JSON" value="false" />
<option name="OTHER" value="true" />
<option name="PHP" value="false" />
<option name="SQL" value="false" />
<option name="Twig" value="false" />
<option name="TypeScript" value="false" />
<option name="Vue" value="false" />
<option name="XML" value="false" />
</context>
</template>
</templateSet>
@oliverthiele
Copy link
Author

Save this file in ~/Library/Preferences/PhpStorm2017.3/settingsRepository/repository/templates/

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