Home Download Buy Blog Forum Support

[BUG] HTML turns to PHP

[BUG] HTML turns to PHP

Postby Poster on Wed Feb 15, 2012 7:18 pm

Hello,

Can someone tell me why when I turn on HTML syntax it automatically turns to PHP? Screen shot attached. I'm running portable version
Attachments
ss.png
ss.png (108.51 KiB) Viewed 1334 times
Last edited by Poster on Thu Feb 16, 2012 8:58 am, edited 1 time in total.
Poster
 
Posts: 6
Joined: Wed Feb 15, 2012 7:07 pm

Re: HTML turns to PHP

Postby nick. on Wed Feb 15, 2012 7:20 pm

The first line of a file is used to predict what language the file is written in and <!DOCTYPE html> is an HTML tag.

Perhaps the file extension should take precedence.
nick.
 
Posts: 266
Joined: Wed Jan 18, 2012 3:45 am

Re: HTML turns to PHP

Postby Poster on Wed Feb 15, 2012 7:24 pm

File is saved as *.html
It did work okay at first, when I just launched ST2. Maybe it doesn't work because of some packages?
Poster
 
Posts: 6
Joined: Wed Feb 15, 2012 7:07 pm

Re: HTML turns to PHP

Postby nick. on Wed Feb 15, 2012 7:38 pm

In your screenshot the file is bb.php. Though it is marked as unsaved, I assumed it was a php file.
I'm not sure what you're asking now -- if it is a *.html file, it will open as HTML.

Are you saying that immediately after manually changing the syntax scheme to PHP it returns to HTML?
nick.
 
Posts: 266
Joined: Wed Jan 18, 2012 3:45 am

Re: HTML turns to PHP

Postby Poster on Wed Feb 15, 2012 7:44 pm

bb.php is the first file, my test.html file tab was behind that white pop-up, where you can see that syntax is checked HTML but in the right bottom corner is set to php (when I click on php in that corner, pop-up shows up, and even there HTML is checked, not php)
Poster
 
Posts: 6
Joined: Wed Feb 15, 2012 7:07 pm

Re: HTML turns to PHP

Postby nick. on Wed Feb 15, 2012 8:18 pm

Can you provide the file so we can test it ourselves?
Did you try it after disabling all installed packages?
nick.
 
Posts: 266
Joined: Wed Jan 18, 2012 3:45 am

Re: HTML turns to PHP

Postby Poster on Wed Feb 15, 2012 9:15 pm

Tried. Nothing.
Attachments
test.zip
(198 Bytes) Downloaded 68 times
Poster
 
Posts: 6
Joined: Wed Feb 15, 2012 7:07 pm

Re: HTML turns to PHP

Postby nick. on Wed Feb 15, 2012 10:25 pm

Well this is strange, I'm having the exact opposite result. Opening the file, the syntax is set to HTML. If I set it to PHP, the check displays next to the item in the syntax menu but the status bar text doesn't update and the file continues to use the HTML.tmLanguage parser. Using build 2178 installed on Win7 x64.

Code: Select all
<!DOCTYPE html>

<head>
   <title>
      Title text
   </title>
</head>
<body>
   
   <p>Hello</p>

</body>
</html>


Perhaps a bug after all...
nick.
 
Posts: 266
Joined: Wed Jan 18, 2012 3:45 am

Re: [BUG] HTML turns to PHP

Postby Poster on Thu Feb 16, 2012 9:36 am

Will the creator of sublime text see this topic and fix this?

Few more questions: now I downloaded and installed dev version, and since they come out quite often, how should I update editor? Remove old version and install new one, or ... ?
And is there plugin that could close tags that I open? When I type <head> I want sublime to add </head> automatically. When II type I don't look at screen a lot, so I don't use this <hea <hit ENTER> thing that inserts <head> and </head>.
Thank you
Poster
 
Posts: 6
Joined: Wed Feb 15, 2012 7:07 pm

Re: [BUG] HTML turns to PHP

Postby Poster on Thu Feb 16, 2012 10:29 am

Alright, weird stuff is going on with build 2178. I have the stable 2165 and there, when I set syntax to be php in progress bar it still is HTML, no matter what I do. And I think it's after I installed sublime-linter. I really don't imagine PHP editor without highlighting syntax errors. So I keep 2165 (portable) in my usb memory stick. Today I downloaded 2178 and installed on my computer. And the problem is opposite: can't turn on PHP, it's always HTML in status bar.
Poster
 
Posts: 6
Joined: Wed Feb 15, 2012 7:07 pm

Next

Return to Technical Support

Who is online

Users browsing this forum: Google [Bot] and 26 guests