• Login
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.
  • J
    Jocelyn Flament
    last edited by Jocelyn Flament Jun 8, 2016, 12:28 PM Jun 8, 2016, 12:26 PM

    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
    • G
      gerdb42
      last edited by Jun 10, 2016, 6:56 AM

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

      1 Reply Last reply Reply Quote 0
      • J
        Jocelyn Flament
        last edited by Jun 12, 2016, 2:30 AM

        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…

        G 1 Reply Last reply Jun 14, 2016, 7:33 AM Reply Quote 0
        • G
          gerdb42 @Jocelyn Flament
          last edited by Jun 14, 2016, 7:33 AM

          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
          • J
            Jocelyn Flament
            last edited by Jun 16, 2016, 4:03 PM

            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.

            C 1 Reply Last reply Jun 16, 2016, 9:55 PM Reply Quote 0
            • C
              Claudia Frank @Jocelyn Flament
              last edited by Jun 16, 2016, 9:55 PM

              @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
              • J
                Jocelyn Flament
                last edited by Jun 17, 2016, 11:03 PM

                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

                C 2 Replies Last reply Jun 17, 2016, 11:20 PM Reply Quote 0
                • C
                  Claudia Frank @Jocelyn Flament
                  last edited by Jun 17, 2016, 11:20 PM

                  @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
                  • C
                    Claudia Frank @Jocelyn Flament
                    last edited by Jun 22, 2016, 12:25 AM

                    @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
                    • J
                      Jocelyn Flament
                      last edited by Jun 28, 2016, 9:42 PM

                      Thank you Claudia for the bug report.

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