{"id":18834,"date":"2011-05-16T07:45:27","date_gmt":"2011-05-16T07:45:27","guid":{"rendered":"https:\/\/blogs.jetbrains.com\/webide\/?p=2338"},"modified":"2024-01-09T15:06:54","modified_gmt":"2024-01-09T14:06:54","slug":"initial-twig-support","status":"publish","type":"phpstorm","link":"https:\/\/blog.jetbrains.com\/pt-br\/phpstorm\/2011\/05\/initial-twig-support","title":{"rendered":"Initial Twig Support in PhpStorm 2.1"},"content":{"rendered":"<p><a href=\"http:\/\/www.twig-project.org\/\" target=\"_blank\" rel=\"noopener\">Twig<\/a> is a template engine for PHP. It is powerful, extensible, unit tested, documented, secure and easy to learn, helps to separate logic (written on php) from representation. That&#8217;s why we are so glad to introduce Initial Twig support in\u00a0upcoming PhpStorm 2.1.<\/p>\n<p><!--more--><\/p>\n<p>By default syntax highlight works for *.twig file types (this might be adjusted in <strong>IDE Settings | File Types | Twig<\/strong>).<\/p>\n<p><a href=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2011\/05\/webide-twig.png\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-2346 alignnone\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2011\/05\/webide-twig.png\" alt=\"\" width=\"499\" height=\"161\" \/><\/a><\/p>\n<p>The language between twig tags can be changed from default HTML to any other supported language in<strong> Project Settings | Template Data Language<\/strong>.<\/p>\n<p>Completion and navigation for file names is active in include, extends and import tags.<br \/>\nBasic completion:<br \/>\n<a href=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2011\/05\/webide-TwigCompleteFileNames.png\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-2349 alignnone\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2011\/05\/webide-TwigCompleteFileNames.png\" alt=\"\" width=\"415\" height=\"107\" \/><br \/>\n<span style=\"color: #000000\"> <\/span><\/a><\/p>\n<p><span style=\"color: #000000\">Open file in editor (Ctrl + &#8216;B&#8217; or Ctrl + Left Click):<\/span><\/p>\n<p><a href=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2011\/05\/webide-TwigGoToFileName.png\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-2350 alignnone\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2011\/05\/webide-TwigGoToFileName.png\" alt=\"\" width=\"413\" height=\"59\" \/><\/a><\/p>\n<p>PhpStorm helpfully closes tags, inserting &#8216;%}&#8217;, &#8216;}}&#8217; or &#8216;#}&#8217;.<br \/>\nCommenting for lines or blocks of code is available with Ctrl + &#8216;\/&#8217; or Ctrl + Shift + &#8216;\/&#8217; hotkeys respectively.<\/p>\n<p>Twig inherits all other great <a href=\"http:\/\/www.jetbrains.com\/phpstorm\/features\/index.html\" target=\"_blank\" rel=\"noopener\">features<\/a> of PhpStorm, however the support is at it&#8217;s initial stage and your feedback and suggestions will be highly appreciated (<a title=\"Submit an issue\" href=\"http:\/\/youtrack.jetbrains.net\/issues\/WI#newissue=yes\" target=\"_blank\" rel=\"noopener\">Submit an issue<\/a>).<\/p>\n<p><em>Develop with pleasure!<\/em><br \/>\n<em>-JetBrains Web IDE Team<\/em><\/p>\n","protected":false},"author":48,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","categories":[808,907],"tags":[45,191,1112],"cross-post-tag":[],"acf":[],"_links":{"self":[{"href":"https:\/\/blog.jetbrains.com\/pt-br\/wp-json\/wp\/v2\/phpstorm\/18834"}],"collection":[{"href":"https:\/\/blog.jetbrains.com\/pt-br\/wp-json\/wp\/v2\/phpstorm"}],"about":[{"href":"https:\/\/blog.jetbrains.com\/pt-br\/wp-json\/wp\/v2\/types\/phpstorm"}],"author":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/pt-br\/wp-json\/wp\/v2\/users\/48"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/pt-br\/wp-json\/wp\/v2\/comments?post=18834"}],"version-history":[{"count":1,"href":"https:\/\/blog.jetbrains.com\/pt-br\/wp-json\/wp\/v2\/phpstorm\/18834\/revisions"}],"predecessor-version":[{"id":432254,"href":"https:\/\/blog.jetbrains.com\/pt-br\/wp-json\/wp\/v2\/phpstorm\/18834\/revisions\/432254"}],"wp:attachment":[{"href":"https:\/\/blog.jetbrains.com\/pt-br\/wp-json\/wp\/v2\/media?parent=18834"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/pt-br\/wp-json\/wp\/v2\/categories?post=18834"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/pt-br\/wp-json\/wp\/v2\/tags?post=18834"},{"taxonomy":"cross-post-tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/pt-br\/wp-json\/wp\/v2\/cross-post-tag?post=18834"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}