Fortran syntax highlighting applied to my PHP files
Jocelyn Flament last edited by Jocelyn Flament
For a few weeks now, when opening a PHP file, Notepad++ applies to it the syntax highlighting of the Fortran language.
In my settings PHP syntax highlighting is configured for php php3 php4 php5 phps phpt phtml and Fortran is configured for f77. So it should work fine.
After opening a PHP file, if I manually switch the language to PHP in the “Language” menu, PHP syntax highlighting is properly applied to the file.
When I open an HTML, XML or CSS file, the syntax highlighting is correct.
I edited the file “langs.model.xml” in Notepad++ folder, and removed the Fortran-related blocks, hoping it would solve the issue. But Notepad++ still identifies my PHP files as Fortran files.
Has anyone encountered the same issue?
I’m now using v6.9.2 (the latest version)
gerdb42 last edited by
Have a look at Settings->Style Configurator->Fortran. Maybe php is listed as user extension.
Thanks gerdb42 for the suggestion.
I checked the settings in “Style configurator” for PHP and Fortran languages. The field “User extension” is empty for both languages.
Before Fortran syntax highlighting was added to Notepad++, syntax highlighting was lways working properly. I don’t understand what’s happening now…
gerdb42 last edited by
Works for me. Try disabling plugins (rename plugins folder in NPP directory). If it woks then, copy plugins one by one back to plugins folder and see if one is responsible for this.
I just uninstalled and completely reinstalled Notepad++, then started with all plugins disabled (I renamed the plugins folder as you said).
I still have issues with PHP syntax highlighting.
However I just noticed something:
- when in Notepad++ if I use the “Open” dialog to open a PHP file, the syntax highlighting seems to be always correct
- when in Windows explorer:
- if I right-click a PHP file and choose “Edit with Notepad++”, the syntax highlighting seems to be always correct
- if I double-click a PHP file (or select it and press ENTER) to have it open automatically by Notepad++, the syntax highlighting seems to always be Fortran!
So I reproduce the issue only when opening files directly from Windows Explorer. And since this is how I usually open the files, I had not thought the way the file is opened would make a difference regarding syntax highlighting.
can you do us a favor a post the debug-info?
Can be found under ? menu.
Here is the requested debug info:
Build time : May 18 2016 - 00:34:05
Path : D:\Program Files (x86)\Notepad++\notepad++.exe
Admin mode : OFF
Local Conf mode : OFF
OS : Windows 10
Plugins : none
Local Conf mode : OFF means you should have
a folder Notepad++ in your %APPDATA% directory.
Could you try the following.
rename %APPDATA%\Notepad++ directory to, let’s say %APPDATA%\Notepad++_backup
Is it still the same behavior?
I have updated to 6.9.2 and can confirm your reported bahavior.
I have opened issue 1996.
Thank you Claudia for the bug report.