Community
    • Login

    Tia ; Is there a pluggin to colorize .js files ?

    Scheduled Pinned Locked Moved Notepad++ & Plugin Development
    18 Posts 4 Posters 2.7k 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.
    • vmars vernonV
      vmars vernon
      last edited by

      Debug info:
      Notepad++ v7.9 (32-bit)
      Build time : Sep 22 2020 - 03:24:22
      Path : C:\Program Files (x86)\Notepad++\notepad++.exe
      Admin mode : OFF
      Local Conf mode : OFF
      OS Name : Windows 10 Home (64-bit)
      OS Version : 1903
      OS Build : 18362.959
      Current ANSI codepage : 1252
      Plugins : MarkdownViewerPlusPlus.dll mimeTools.dll NppConverter.dll NppExport.dll NppMarkdownPanel.dll

      1 Reply Last reply Reply Quote 0
      • PeterJonesP
        PeterJones
        last edited by PeterJones

        @vmars-vernon ,

        I see you are impatiently waiting for more help. Since you only provided half of what I’d asked for, it seems rather rude for you to get impatient about it – you gave the debug info, but not the screen shot.

        The JavaScript lexer correctly colorizes for me. Until you can show us how it’s not working for you, we cannot help you:
        3820c56a-6848-4e71-aae5-b7eac4ba838a-image.png

        For other trouble shooting: go to Settings > Style Configurator: what is your theme? If it’s not the default, try to change the Theme to Default (stylers.xml). If this makes JavaScript colorize, then the problem is with your chosen theme not definining the JavaScript file type colors. If this is the culprit, let us know, and we can walk you through how to make the change to the theme config file to tell it about the JavaScript file type.

        vmars vernonV 1 Reply Last reply Reply Quote 3
        • Krishna JK
          Krishna J @vmars vernon
          last edited by

          @vmars-vernon - Thanks

          1 Reply Last reply Reply Quote 0
          • vmars vernonV
            vmars vernon @PeterJones
            last edited by

            PeterJones notepad++_J2fxTIU1VF.png
            Thanks

            PeterJonesP 1 Reply Last reply Reply Quote 0
            • PeterJonesP
              PeterJones @vmars vernon
              last edited by PeterJones

              @vmars-vernon ,

              It works for me.

              When I type that exact code and save as browser.js, it correctly highlights the syntax:
              e18e636c-3be5-4f0b-a8e0-44d09feddd30-image.png

              You didn’t answer my question about what theme you’re using. You didn’t answer my question as to whether switching to Default (stylers.xml) worked for you. You are going to need to answer all requests-for-info asked of you, or we are not going to be able to help you.

              1. Please confirm that the lower corner of your window says “JavaScript file” like mine does. If it does not, then it has not selected the correct parser. Doing an Alt+PrintScreen or use the Windows Snipping Tool (Shift+WindowsKey+S) to grab a screenshot like the above, and paste it here, to show whether Notepad++ has recognized that browser.js is JavaScript or not.

              2. Please go to the Settings > Style Configurator, click on JavaScript in the Language: column, and INSTRUCTION WORD in the Style: column, then hit Alt+PrintScreen or use Snipping Tool to give us the full Style Configurator dialog, like I have shown here:
                80ba1599-70ef-4339-80c3-ab8c30d36a53-image.png
                please note that the INSTRUCTION WORD includes the color info for function(), which I have shown as properly highlighted; this will give us a clue as to what’s going wrong with yours.
                If yours does not have the JavaScript language entry, or if the Styles listed are different, then you probably have an outdated config file… but we’ll have to wait for your reply to know for sure.

              If you don’t answer both of these questions, I will not be able to help you further.

              1 Reply Last reply Reply Quote 1
              • vmars vernonV
                vmars vernon
                last edited by

                Sorry I got behind:
                notepad++_JDGkV7NYC7.png notepad++_Uws56YA3TM.png notepad++_dkuf8Dkqxs.png
                Thanks

                PeterJonesP 1 Reply Last reply Reply Quote 0
                • PeterJonesP
                  PeterJones @vmars vernon
                  last edited by

                  @vmars-vernon ,

                  The style configurator shows you’re using the default style, and you’ve got the same color as I showed for the INSTRUCTION WORD, so that’s configured properly.

                  Unfortunately, you may have noticed that there was a difference in the lower-left corner of the status bar on yours vs. mine in the full-notepad++ screenshot: mine shows the language (file type), yours does not. The status bar hides the file type field when the window is too narrow. So unfortunately, it hid the information I was looking for – whether Notepad++ is truly recognizing that particular file as JavaScript. Can you widen your Notepad++ window until the status bar shows either Normal text file or JavaScript file or XXXXXX file, and take a new screenshot?

                  The other experiment you could run is to close all Notepad++ windows, download the portable v7.9-32bit (download link here), unzip to a folder on your desktop, run Notepad++ from that folder, File Open c:\Electron-js\Best-Electron-Browser\browser.js, and see if a fresh copy correctly colorizes the javascript for you or not. (It does for me, obviously). If it works on the portable but not on your installed copy, then there is some configuration difference between the two, which we’ll help you through debugging.

                  1 Reply Last reply Reply Quote 1
                  • vmars vernonV
                    vmars vernon
                    last edited by

                    ckHDNCoBSh.png notepad++_exNhe7Ql0Z.png

                    PeterJonesP 1 Reply Last reply Reply Quote 0
                    • PeterJonesP
                      PeterJones @vmars vernon
                      last edited by

                      @vmars-vernon ,

                      My best guess is still that you’ve got a weird config file problem. The experiment using the portable edition will help shed more light.

                      If anyone else wants to chime in with other ideas, feel free.

                      1 Reply Last reply Reply Quote 0
                      • vmars vernonV
                        vmars vernon
                        last edited by

                        I just Restarted my system
                        and reDownloaded np++Portable
                        and re-do on all your suggestions
                        and voila , np++Portable works fine for .js .
                        Thank you very much !
                        KmT1pHJvTg.png

                        PeterJonesP 1 Reply Last reply Reply Quote 1
                        • PeterJonesP
                          PeterJones @vmars vernon
                          last edited by

                          @vmars-vernon ,

                          Glad it worked.

                          If you don’t have any settings you care about from your installed version, you could just go to and delete the whole %AppData%\Notepad++\ folder and let Notepad++ re-create the configs with default settings. If you do care about previous settings, it will take some effort on your part to determine which config file is the cause: I would suggest something like: rename %AppData%\Notepad++ to %AppData%\Notepad++.old\, launch Notepad++ to re-create configs with defaults, then one-at-a-time, exit notepad++ and copy one config file from .old to the new folder and rerun notepad++ until it stops highlighting JS; once you find the culprit, you can compare the old vs default config files and try to figure out what setting was the culprit. But it might be easier for you to just start from the fresh config on your installed copy, and then change the settings back to the way you like it from within Notepad++ GUI itself.

                          Let us know if you need more help with that process. Make sure to provide details on exactly how far you’ve gotten.

                          1 Reply Last reply Reply Quote 2
                          • vmars vernonV
                            vmars vernon
                            last edited by

                            I don’t really know what this is %AppData%\Notepad++\
                            so I searched for it in files :

                            AgentRansack_hSrKPVb8tP.png

                            I guess that’s all normal .
                            Think I’ll just tip toe away :)
                            Thanks

                            Alan KilbornA PeterJonesP 2 Replies Last reply Reply Quote 0
                            • Alan KilbornA
                              Alan Kilborn @vmars vernon
                              last edited by Alan Kilborn

                              @vmars-vernon said in Tia ; Is there a pluggin to colorize .js files ?:

                              I don’t really know what this is %AppData%\Notepad++\

                              In Windows Explorer, type %appdata% here:

                              00ab5886-96dc-440b-875b-eedb27c41dcf-image.png

                              and press Enter.

                              You will be jumped to a display like this where you can see the Notepad++ folder @PeterJones mentioned:

                              90fd6f07-f770-4fa6-afe8-53ef0dfa9378-image.png

                              1 Reply Last reply Reply Quote 1
                              • PeterJonesP
                                PeterJones @vmars vernon
                                last edited by

                                @vmars-vernon said in Tia ; Is there a pluggin to colorize .js files ?:

                                I don’t really know what this is

                                There’s a FAQ in this Forum on that: https://community.notepad-plus-plus.org/topic/15740/faq-desk-what-is-appdata

                                Do people not check FAQ of a forum anymore?

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