Tia ; Is there a pluggin to colorize .js files ?
-
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 -
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:
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-vernon - Thanks
-
PeterJones
Thanks -
It works for me.
When I type that exact code and save as
browser.js
, it correctly highlights the syntax:
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.-
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 thatbrowser.js
is JavaScript or not. -
Please go to the Settings > Style Configurator, click on
JavaScript
in the Language: column, andINSTRUCTION WORD
in the Style: column, then hitAlt+PrintScreen
or use Snipping Tool to give us the full Style Configurator dialog, like I have shown here:
please note that theINSTRUCTION WORD
includes the color info forfunction()
, 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 theJavaScript
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.
-
-
Sorry I got behind:
Thanks -
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
orJavaScript file
orXXXXXX 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. -
-
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.
-
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 !
-
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.
-
I don’t really know what this is %AppData%\Notepad++\
so I searched for it in files :I guess that’s all normal .
Think I’ll just tip toe away :)
Thanks -
@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:and press Enter.
You will be jumped to a display like this where you can see the Notepad++ folder @PeterJones mentioned:
-
@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?