I want to set the default html syntax for *.xtpl / *.tpl / etc.
How can i do this?
<key>fileTypes</key>
<array>
<string>html</string>
<string>htm</string>
<string>shtml</string>
<string>xhtml</string>
<string>phtml</string>
<string>inc</string>
<string>tmpl</string>
<string>tpl</string>
<string>ctp</string>
<string>xtpl</string> <!-- added this line for *.xtpl support -->
</array>
while self.living? do
mistake = Mistake.new
self.learn_from!(mistake) unless mistake.fatal?
end {
"name": "PHP",
"rules": [
{"file_name": ".*\\.(php|inc)$"},
{"first_line": "^<\\?php"}
]
},
{
"name": "HTML (PHP Cake)",
"rules": [
{"file_name": ".*\\.(ctp|thtml)$"}
]
},
cgibby wrote:I have the same question. I'm trying to get .ctp files automatically recognized as "HTML (PHP Cake)" and I have that option checked in the "Open all with current Extension as..." submenu, but every time I reopen one of those files, it reverts to the "PHP" syntax. I also have a DetectSyntax rule set up (see code below), but that doesn't seem to do it either.
- Code: Select all
{
"name": "PHP",
"rules": [
{"file_name": ".*\\.(php|inc)$"},
{"first_line": "^<\\?php"}
]
},
{
"name": "HTML (PHP Cake)",
"rules": [
{"file_name": ".*\\.(ctp|thtml)$"}
]
},
while self.living? do
mistake = Mistake.new
self.learn_from!(mistake) unless mistake.fatal?
endUsers browsing this forum: No registered users and 4 guests