Help with various configurations....
-
Hello, can you tell me if any of the following configurations can be done from the application, if not, I would appreciate if possible, to include them in future updates, to use it as a notepad.
1.- The direct links appear in underlined black color, and when the mouse cursor is placed over them, they appear in blue color, how can I change the black color for blue? So that it is always shown in blue, whether the mouse is over it or not.
2.- How to save the document automatically when I exit the application?
I have installed the Auto Save plugin, but it only saves every 1 minute.3.- How can I put a colored text?
I have seen that there is a “Styles” option to set a colored background, it seems a little limited, can I set more colors?
How can I make the text bold and underlined?If these options can not be configured in the same application, is there any plugin with which they can be done?
P.S. sorry for the length of this post.
Thanks.
-
-
Settings > Style Configurator > Language: Global Styles > Style: URL hovered will change the color of the hovered URL, and you can change that to match the style used by URLs elsewhere
-
The best description I can give of the AutoSave plugin settings is in the FAQ I wrote about it here . But in short, save-on-exit is not one of the AutoSave features. However, since Notepad++ loses focus when you are exiting Notepad++, that might help (I’ve never tried that exact combo).
Edit: you might be able to ask the author of that plugin to add “save-on-exit-notepad++” as an option in that plugin’s issues page -
Text files have no color. Notepad++ stylers add colors based on certain language heuristics/rules. The colors/bolds/etc that Notepad++ naturally applies come from the syntax highlighting portion of the program; those formats aren’t intrinsic to the file you are editing, but are rather imposed every time that Notepad++ opens the file for you to edit; they are not saved in the file
If you were to somehow get Notepad++ to “set it as a color” and save that to disk, it would cease to be a pure text file, and would instead be a proprietary format ala MS Word’s.docx
, which is not the point of Notepad++. Text editors don’t set bolds, underlines, etc; word processors do. Notepad++ is a text editor, not a word processor.
You can temporary use those “Styles” you mentioned to mark certain characters… but it’s only temporary, and won’t be saved with the file. The Settings > Style Configurator > Language: Global Styles > Style: Mark Style # hold the colors for each of those 5 styles… but the only color that takes effect are the background color (and that is slightly transparent, so it won’t be exactly the color you pick).
- docs on the “Global Styles” rules in Style Configurator = https://npp-user-manual.org/docs/preferences/#global-styles
- autosave FAQ = https://community.notepad-plus-plus.org/topic/21782/faq-desk-periodic-backup-vs-autosave-plugin
-
-
Hi PeterJones, thank you very much for your help,
I think I explained wrong, what I want to change is the black color that has the link, for another color.
-
@socu said in Help with various configurations....:
what I want to change is the black color that has the link, for another color.
So the underlining of the link is done with Scintilla “indicators” which are like “add ons” to the text. In this case, the “add on” IS the underline; the actual text is not affected by the indicator.
While I’m fairly sure that the color of the underline itself can be changed (well, with some scripting code), I don’t think the text color can be changed…without getting rid of the underline (which I’d be reluctant to do because underlines are key to the link concept, and mentally ingrained).
If anyone has a differing opinion, I’d be glad to be shown how I’m wrong. :-)
-
No, the color of the text does not need to be changed, because of what you said before, I guess you can not put for example a red color.
If you change the link to the color that is shown when it is highlighted in blue, it would also be fine, it already has a different color.
Let’s see if someone has some Script with which it can be achieved. -
@socu ,
To put it another way: the setting I showed (the hover style) was a hint as to what’s going on under the hood: the fact that there’s a hovered-URL style but not a non-hovered-URL style indicates that the hovering is the action that’s causing a change in style; the non-hovered URL is just colored with the standard foreground and background colors, but it adds the underline indicator (as @Alan-Kilborn explained already). So to change the non-hovered URL color, you have to change the default color of text… and for some reason, I doubt you would be happy with having all the normal text be blue just to make URLs be blue.
Since what I believe you want cannot be done natively with the existing Notepad++ options, you could use the PythonScript plugin, and write a script based on
EnhanceAnyLexer.py
that @Ekopalypse shares in his github repo – but instead of tying it to a particular lexer or UDL, just have it always run – that would recognize a URL pattern of your choice, and change the color to match your desire. -
@peterjones said in Help with various configurations....:
write a script based on EnhanceAnyLexer.py…that would recognize a URL pattern of your choice, and change the color…
I’d think if this route were taken, one would want to reference the Notepad++ code that determines what text should be underlined, and do it this same way in the script.
-
Hi, I have already created the EnhanceAnyLexer.py, but it doesn’t give me the option to configure it to show the links in a different color, only to add a key combination.
P.S. I don’t know what’s wrong, but I still don’t receive notifications of new replies.
-
@socu ,
You configure it by editing the code in the script. Instead of using the example regex that is shown by default in the code, you would have to define your own regex that would correctly match any URLs you care about. And you would either have to set it up for every file type that you use (the example in
EnhanceAnyLexer.py
is just one language IIRC), or you would find the per-language logic and short-circuit it, so it always uses the same regex for every available lexer language. -
@socu said in Help with various configurations....:
P.S. I don’t know what’s wrong, but I still don’t receive notifications of new replies.
That feature didn’t used to work at all. And then the hosting company did a behind the scenes update, and it started working somewhat. But you have to click on your avatar, and go to Settings, and for each type of notification, you need to check if it’s set to notify you in your preferred method:
If you want email notifications, you might also need to go to the avatar button and pick Edit Profile, and change email, and make sure a valid email is entered -
Thank you, I think I have now configured that section,