Community
    • Login

    Fortran syntax highlighting applied to my PHP files

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    syntax highlightphpfortran
    10 Posts 3 Posters 5.8k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Jocelyn FlamentJ
      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)

      1 Reply Last reply Reply Quote 0
      • gerdb42G
        gerdb42
        last edited by

        Have a look at Settings->Style Configurator->Fortran. Maybe php is listed as user extension.

        1 Reply Last reply Reply Quote 0
        • Jocelyn FlamentJ
          Jocelyn Flament
          last edited by

          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…

          gerdb42G 1 Reply Last reply Reply Quote 0
          • gerdb42G
            gerdb42 @Jocelyn Flament
            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.

            1 Reply Last reply Reply Quote 0
            • Jocelyn FlamentJ
              Jocelyn Flament
              last edited by

              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.

              Claudia FrankC 1 Reply Last reply Reply Quote 0
              • Claudia FrankC
                Claudia Frank @Jocelyn Flament
                last edited by

                @Jocelyn-Flament

                can you do us a favor a post the debug-info?
                Can be found under ? menu.

                Cheers
                Claudia

                1 Reply Last reply Reply Quote 0
                • Jocelyn FlamentJ
                  Jocelyn Flament
                  last edited by

                  Here is the requested debug info:
                  Notepad++ v6.9.2
                  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

                  Claudia FrankC 2 Replies Last reply Reply Quote 0
                  • Claudia FrankC
                    Claudia Frank @Jocelyn Flament
                    last edited by

                    @Jocelyn-Flament

                    Local Conf mode : OFF means you should have
                    a folder Notepad++ in your %APPDATA% directory.

                    Could you try the following.
                    Close Npp
                    rename %APPDATA%\Notepad++ directory to, let’s say %APPDATA%\Notepad++_backup
                    Start Npp

                    Is it still the same behavior?

                    Cheers
                    Claudia

                    1 Reply Last reply Reply Quote 0
                    • Claudia FrankC
                      Claudia Frank @Jocelyn Flament
                      last edited by

                      @Jocelyn-Flament

                      I have updated to 6.9.2 and can confirm your reported bahavior.
                      I have opened issue 1996.

                      Cheers
                      Claudia

                      1 Reply Last reply Reply Quote 0
                      • Jocelyn FlamentJ
                        Jocelyn Flament
                        last edited by

                        Thank you Claudia for the bug report.

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        The Community of users of the Notepad++ text editor.
                        Powered by NodeBB | Contributors