5

Basically my issue is when I set the text mode to PHP my HTML is losing it's syntax highlighting whilst using the Material colour theme. It highlights all HTML as white and if i switch to HTML it highlight all PHP as white. This issue started yesterday after upgrading to Sublime build 3103. Anyone know how to fix it?

PHP syntax highlighted

HTML syntax highlighted

Cheers

3
  • I think this kind of questions should not be asked on stackoverflow. unrelated. Commented Feb 10, 2016 at 12:34
  • 5
    @Stichoza From What topics can I ask about here? in the help center, software questions are allowed if they cover "[...] software tools commonly used by programmers". Sublime Text, like vim, emacs, Notepad++, etc., is a programming editor, and there are tens of thousands of questions about them on this site that are perfectly on-topic. Commented Feb 12, 2016 at 0:10
  • For users here in 2017+, this issue was fixed in build 3120. If your php syntax highlighting in sublime is non-existent or wonky, it is a separate issue from the one here. Commented Mar 3, 2017 at 16:38

3 Answers 3

3

There is a thread on Sublime forum about this, it should be fixed in next development version. You could maybe downgrade to a working version until its fixed properly.

https://forum.sublimetext.com/t/php-detection-broken-in-3103/17355

Sign up to request clarification or add additional context in comments.

1 Comment

For the time being I've switched to using Material-Theme-OceanicNext which seems to work fine. Cheers for this though!
0

Follow these Steps-

  1. Uninstall sublime text
  2. Go to "C:\User\Appdata\local" and delete Sublime text folder
  3. Go to "C:\User\Appdata\Roaming" and delete Sublime text folder
  4. Go to "C:\User" you will find Sublime text folder go inside if there are your project files then save them to other location and delete that Sublime text folder also
  5. Now install Sublime text (which is <10MB)

Run your sublime text is all set you can config it again with fresh start

Comments

-2

Go to "View > Syntax" and select: PHP

2 Comments

Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
The original problem was caused by a bug in Sublime, and the accepted answer from 5 years ago shows when the bug was fixed. This answer is more of a general “how to” instead of focusing on what was actually asked, and it doesn’t bring anything new.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.