• Login
Community
  • Login

Not showing javascript styles

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
11 Posts 5 Posters 10.3k 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.
  • M
    meiranolick
    last edited by Nov 14, 2015, 7:31 PM

    This is probably considered a minor problem, but it is really bugging me. I updated to the latest version of notepad++ and suddenly it is no longer detecting javascript files correctly and therefore it is retaining the default styles when viewing my .js files. In addition, even when I explicitly choose “Javascript” from the language list, the styles still do not change. Anything I can do to fix it?

    Also, I’ve been happily using notepad++ for all my web development needs for the past three and a half years plus, and plan to continue doing so. Thanks for the help!

    1 Reply Last reply Reply Quote 0
    • А
      Андрей Черников
      last edited by Nov 14, 2015, 8:16 PM

      I have a similar problem with javascript files, I don’t care about the styles though, but comment hotkeys stopped working for .js files after some recent update. I found that launching Notepad++ under admin account fixes this issue. This might help you too.

      1 Reply Last reply Reply Quote 0
      • P
        Peter Brand
        last edited by Nov 15, 2015, 2:22 PM

        It seems to be fixed now in version 6.8.6. What version are you running?

        1 Reply Last reply Reply Quote 0
        • M
          meiranolick
          last edited by Nov 15, 2015, 7:58 PM

          It was specifically with the update to 6.8.6 that the problem started. Is there any more information I might be able to offer to help find the cause of this problem?
          @Андрей Черников I tried running Notepad++ as admin just now, and the problem persisted. Thank you for the idea.

          1 Reply Last reply Reply Quote 0
          • T
            Tatu Rissanen
            last edited by Nov 17, 2015, 9:52 AM

            Open Settings - Style Configurator. If you scroll down the list of languages you will notice there are 2 items for Javascript. The first item styles embedded Javascript (inside <script> element in HTML file) and the last item styles Javascript files.

            1 Reply Last reply Reply Quote 0
            • M
              meiranolick
              last edited by Nov 17, 2015, 12:38 PM

              Thank you very much, that’s exactly what I was looking for! I was able to fix the styles to my liking. Unfortunately, now it’s only adding background to the text on the page, but all whitespace is left with the default white background.

              1 Reply Last reply Reply Quote 0
              • T
                Tatu Rissanen
                last edited by Nov 17, 2015, 6:46 PM

                The whitespace in Javascript files picks up style from Global Styles:

                • Global override (depending what overrides you have enabled)
                • Default Style
                • Current line background (if Preferences - Editing - Enable current line highlighting is checked)
                M 1 Reply Last reply Nov 17, 2015, 7:21 PM Reply Quote 0
                • M
                  meiranolick @Tatu Rissanen
                  last edited by Nov 17, 2015, 7:21 PM

                  @Tatu-Rissanen I have the overrides disabled. I can verify that what you say is accurate, but I do not understand this behavior. Up until now, all my files had a default background color of white, and my js files had a different background color. Why is that no longer the case?

                  1 Reply Last reply Reply Quote 0
                  • T
                    Tatu Rissanen
                    last edited by Nov 17, 2015, 11:22 PM

                    I don’t know why.

                    The new Javascript language was added in Notepad++ version 6.8.4. I guess the author wanted the new Javascript DEFAULT style to behave similar to other languages. That is not overwriting the global default style for whitespace and areas after end-of-line or end-of-file.

                    M 1 Reply Last reply Nov 18, 2015, 8:20 AM Reply Quote 0
                    • M
                      meiranolick @Tatu Rissanen
                      last edited by Nov 18, 2015, 8:20 AM

                      @Tatu-Rissanen Ok, thank you very much for your help.

                      1 Reply Last reply Reply Quote 0
                      • A
                        Andres Correal
                        last edited by Jan 7, 2016, 3:52 PM

                        I am having this problem with javascript files in 6.8.8. I was fine before just installing. Issue occurs whether in as admin or not. Have to associate each file independently to get it to work. Would rather it recognizes it the .js extension and does it automatically.

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