Home Download Buy Blog Forum Support

Is there a Smarty plugin for Sublime Text?

Re: Is there a Smarty plugin for Sublime Text?

Postby jfse on Wed Sep 26, 2012 1:45 pm

I have a small issue with this smarty plugin, quotes (single and double) printed outside smarty tags are interpreted as start of string.
Meaning if I have "hasn't" as a string in html, or even a html-comment, the rest of the file will be interpreted as being in a string.

I'm hoping this could be changed by tweaking a regexp or two in the settings-file, but before I try to understand how they work on my own, does anyone else know?
jfse
 
Posts: 1
Joined: Wed Sep 26, 2012 1:38 pm

Re: Is there a Smarty plugin for Sublime Text?

Postby gianiaz on Thu Dec 27, 2012 11:27 am

This method works for me, but unfortunately the emmet plugin doesn't work if I use smarty syntax highligher. Any suggestion?

Another question about this, if I want to limit the scope of snippets to html and tpl files what I should use as scope? I've tried source.tpl and text.tpl, but It seems it's not the right choice :-)

Thank you
gianiaz
 
Posts: 6
Joined: Thu Dec 27, 2012 7:31 am

Re: Is there a Smarty plugin for Sublime Text?

Postby mr.vasseur on Mon Jul 22, 2013 11:28 pm

If you already a Smarty.tmLanguage or Smarty.sublime-package (in AppData\Roaming\Sublime Text 2\Packages\Smarty\Syntaxes for example) you can still follow Tito's steps but at step 3. file no need to download textmate's Smarty.plist.
You can use yours just by giving your Smarty.tmLanguage scopeName found at the end of the file.
for me it was

<key>scopeName</key>
<string>text.html.smarty</string>

and copy it in place of source.smarty so
Code: Select all
<array>
  <dict>
    <key>include</key>
    <string>source.smarty</string>
  </dict>
</array>

become
Code: Select all
<array>
  <dict>
    <key>include</key>
    <string>text.html.smarty</string>
  </dict>
</array>


and that should do it
mr.vasseur
 
Posts: 1
Joined: Mon Jul 22, 2013 11:14 pm

Previous

Return to Ideas and Feature Requests

Who is online

Users browsing this forum: Yahoo [Bot] and 10 guests