All Projects → mblode → vscode-twig-language

mblode / vscode-twig-language

Licence: MIT license
VS Code extension with snippets, syntax highlighting, hover, and formatting for Twig.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to vscode-twig-language

craft-twig
Craft CMS Package for Atom
Stars: ✭ 17 (-51.43%)
Mutual labels:  twig
Slim-Auth
A Slim 4 Skeleton.
Stars: ✭ 22 (-37.14%)
Mutual labels:  twig
DrupalTwigFood
Useful functions, filters for twig @ Drupal 8
Stars: ✭ 1 (-97.14%)
Mutual labels:  twig
gw-starter-kit
PEPELAC - Современный инструментарий для вёрстки и создания статичных сайтов с использованием Webpack
Stars: ✭ 30 (-14.29%)
Mutual labels:  twig
yaf-example
A example of yaf
Stars: ✭ 53 (+51.43%)
Mutual labels:  twig
twig-bulma-form-theme-bundle
A Twig Form Theme for Bulma 0.3.x for use with the Symfony 2.8 / 3.x framework
Stars: ✭ 24 (-31.43%)
Mutual labels:  twig
frontie
Frontie is a front-end boilerplate. Gulp | Twig.js | Sass | Autoprefixer | Browsersync | Bootstrap 4 Grid System & Responsive Breakpoints
Stars: ✭ 28 (-20%)
Mutual labels:  twig
Symfony-code-snippets
Over 100 Symfony Code Snippets for PhP code And Over 80 Twig Code Snippets. Just type the letters 'sf' to get a list of all available Symfony Code Snippets. For Twig Just Type the Tag name and you will get AutoCompletion.
Stars: ✭ 15 (-57.14%)
Mutual labels:  twig
drupal-template-helper
Debug Drupal 8 templates in Chrome Devtools. drupal-template-helper is a chrome extension for Drupal that lists all available templates and the preprocess hooks to use to customize your templates.
Stars: ✭ 115 (+228.57%)
Mutual labels:  twig
craft-helper
A collection of useful Craft CMS macros and components.
Stars: ✭ 23 (-34.29%)
Mutual labels:  twig
archetype-symfony
This is our Symfony project template
Stars: ✭ 12 (-65.71%)
Mutual labels:  twig
aspect
Aspect is a compiling template engine for Lua and LuaJIT
Stars: ✭ 17 (-51.43%)
Mutual labels:  twig
standard-edition
Roadiz CMS v1 standard edition (not-headless)
Stars: ✭ 32 (-8.57%)
Mutual labels:  twig
shopify-mail-notifications
Blazing-fast Shopify mail notifications templating environment with Liquid, MJML and Twig
Stars: ✭ 25 (-28.57%)
Mutual labels:  twig
markdown-extra
Markdown extension for Twig
Stars: ✭ 83 (+137.14%)
Mutual labels:  twig
digster
Twig templates for WordPress
Stars: ✭ 12 (-65.71%)
Mutual labels:  twig
19h47.fr
🔥
Stars: ✭ 25 (-28.57%)
Mutual labels:  twig
phpPgAdmin6
PHP7+ Based administration tool for PostgreSQL 9.3+
Stars: ✭ 45 (+28.57%)
Mutual labels:  twig
PhpStorm-Live-Templates-Craft-CMS
PhpStorm Live Templates for Craft CMS
Stars: ✭ 34 (-2.86%)
Mutual labels:  twig
cssinliner-extension
[DEPRECATED] CSS inliner support for Twig
Stars: ✭ 30 (-14.29%)
Mutual labels:  twig

VSCode Twig Language

  • Syntax highlighting
  • Snippets
  • Emmet
  • Pretty Diff Formatting
  • Hover
  • HTML intellisense

Installation

Install through Visual Studio Code extensions. Search for Twig Language

Visual Studio Code Market Place: Twig Language

Documentation

Twig Language is a Visual Studio Code extension that provides snippets, syntax highlighting, hover, and formatting for the Twig file format.

Twig syntax highlighting and language support

This extension provides language support for the Twig syntax.

Code formatter/beautifier for Twig files

Using PrettyDiff, this extension implements the only working code formatter for Twig files in VSCode.

Information about Twig code on hover

VSCode Twig language shows information about the symbol/object that's below the mouse cursor when you hover within Twig files.

Craft CMS/Twig code snippets

Adds a set of Craft CMS/Twig code snippets to use in your Twig templates.

Generic Triggers

do                {% do ... %}
extends           {% extends 'template' %}
from              {% from 'template' import 'macro' %}
import            {% import 'template' as name %}
importself        {% import _self as name %}
inc, include      {% include 'template' %}
incp              {% include 'template' with params %}
inckv             {% include 'template' with { key: value } %}
use               {% use 'template' %}

autoescape        {% autoescape 'type' %}...{% endautoescape %}
block, blockb     {% block name %} ... {% endblock %}
blockf            {{ block('...') }}
embed             {% embed "template" %}...{% endembed %}
filter, filterb   {% filter name %} ... {% endfilter %}
macro             {% macro name(params) %}...{% endmacro %}
set, setb         {% set var = value %}
spaceless         {% spaceless %}...{% endspaceless %}
verbatim          {% verbatim %}...{% endverbatim %}

if, ifb           {% if condition %} ... {% endif %}
ife               {% if condition %} ... {% else %} ... {% endif %}
for               {% for item in seq %} ... {% endfor %}
fore              {% for item in seq %} ... {% else %} ... {% endfor %}

else              {% else %}
endif             {% endif %}
endfor            {% endfor %}
endset            {% endset %}
endblock          {% endblock %}
endfilter         {% endfilter %}
endautoescape     {% endautoescape %}
endembed          {% endembed %}
endfilter         {% endfilter %}
endmacro          {% endmacro %}
endspaceless      {% endspaceless %}
endverbatim       {% endverbatim %}

Craft Triggers

asset                    craft.assets.one()
assets, assetso          craft.assets loop
categories, categorieso  craft.categories loop
entries, entrieso        craft.entries loop
feed                     craft.app.feeds.getFeedItems loop
t                        | t
replace                  | replace('search', 'replace')
replacex                 | replace('/(search)/i', 'replace')
split                    | split('\n')
tags, tagso              craft.tags loop
users, userso            craft.users loop

cache                    {% cache %}...{% endcache %}
children                 {% children %}
exit                     {% exit 404 %}
ifchildren               {% ifchildren %}...{% endifchildren %}
css                      {% css %}...{% endcss %}
registercssfile          {% do view.registerCssFile("/resources/css/global.css") %}
js                       {% js %}...{% endjs %}
registerjsfile           {% do view.registerJsFile("/resources/js/global.js") %}
matrix, matrixif         Basic Matrix field loop using if statements
matrixifelse             Basic Matrix field loop using if/elseif
matrixswitch             Basic Matrix field loop using switch
nav                      {% nav item in items %}...{% endnav %}
paginate                 Outputs example of pagination and prev/next links
redirect                 {% redirect 'login' %}
requirelogin             {% requireLogin %}
requirepermission        {% requirePermission "spendTheNight" %}
switch                   {% switch variable %}...{% endswitch %}

csrf                     {{ csrfInput() }}
endbody                  {{ endBody() }}
head                     {{ head() }}

getparam                 craft.app.request.getParam()
getbodyparam             craft.app.request.getBodyParam()
getqueryparam            craft.app.request.getQueryParam()
getsegment               craft.app.request.getSegment()

case                     {% case "value" %}
endcache                 {% endcache %}
endifchildren            {% endifchildren %}
endcss                   {% endcss %}
endjs                    {% endjs %}
endnav                   {% endnav %}

ceil                     ceil()
floor                    floor()
max                      max()
min                      min()
shuffle                  shuffle()
random                   random()
round                    num | round()
url, urla                url('path'), url('path', params, 'http', false)

rss                      Example rss feed

dd                       <pre>{{ dump() }}</pre>{% exit %}
dump                     <pre>{{ dump() }}</pre>

Example Forms

formlogin                Example login form
formuserprofile          Example user profile form
formuserregistration     Example user registration form
formforgotpassword       Example forgot password form
formsetpassword          Example set password form
formsearch               Example search form
formsearchresults        Example search form results

Reference Hints

info            All craft.assets properties and template tags
info            All craft.crategories properties and template tags
info            All craft.config properties and template tags
info            All craft.entries properties and template tags
info            All craft.feeds properties and template tags
info            All craft.fields properties and template tags
info            All craft.globals properties and template tags
info            All craft.request properties and template tags
info            All craft.sections properties and template tags
info            All craft.session properties and template tags
info            All craft.tags properties and template tags
info            All craft.users properties and template tags
info            All craft globals (site info, date, users, template tags)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].