Author Topic: syntax coloring error for PHP file edited in HTML mode  (Read 386 times)

jcelle

  • Senior Community Member
  • Posts: 242
  • Hero Points: 5
syntax coloring error for PHP file edited in HTML mode
« on: September 01, 2022, 09:50:17 am »
I am attaching a sample file and a screenshot pointing out the culprit lines and how the text should be displayed.
Steps:
- open file html-syntax-color.php
- Document / Set Mode => HTML

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6579
  • Hero Points: 511
Re: syntax coloring error for PHP file edited in HTML mode
« Reply #1 on: September 01, 2022, 05:16:52 pm »
I can't reproduce this.

Try a default config:

Code: [Select]
vs +new -sc c:\temp\new-config-dir

Then open your .php file. There should not be a need to set the file mode. That would indicate a configuration problem. If this correctly color codes, the problem is in your user.cfg.xml (some configuration change(s)).

jcelle

  • Senior Community Member
  • Posts: 242
  • Hero Points: 5
Re: syntax coloring error for PHP file edited in HTML mode
« Reply #2 on: September 02, 2022, 07:22:43 am »
You are right Clark, this problem does not show up with a new config.
I don't remember if I did something special to have php files opened in PHP mode (this is what I want anyway as very few files need to be edited in HTML mode for my projects) but I would be interested to find out what can be wrong in my user.cfg.xml file.
What should I look for ?
Attaching it just in case you could have a quick look and spot some obvious setting.
Thanks for your help.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6579
  • Hero Points: 511
Re: syntax coloring error for PHP file edited in HTML mode
« Reply #3 on: September 02, 2022, 05:03:47 pm »
The attached user.cfg.xml should fix this.

You had made some modifications to PHP color coding. I just removed them and that fixed the problem. There was also a very odd looking change to HTML color coding which I removed. You could do the same by using the "Reset" button on the color coding dialog for these languages.

Tools>Options>Languages>Web Authoring Languages>PHP>Color Coding
Tools>Options>Languages>Web Authoring Languages>HTML>Color Coding