Is there a way to “format” selected characters in a document and invert the fore and background colors?
Not permanently. This is a text editor, and text (like a .txt file) doesn’t store things like font and color.
There are ways to convince Notepad++ to higlight things: you can use the Mark dialog to temporarily mark things, or the Search > Style All Occurrences / Style One Token actions to add color (similar to inverse video) temporarily. But that doesn’t get saved in the file, because that’s not a feature of text files.
Folks, I am sorry about the tone of my message above, I was very upset with this workflow-breaking change. Apparently some changes are going to be made in the next update, I hope this issue with shutdown will be addressed in a smart way (i.e. with no data loss on windows which do not have associated file). Keep up the good work!
Thanks for your observations,
I’ll try your suggestion and see what happens.
Although my exposed idea is precisely so that Notepad++ does not need PhythonScript or NppExe, that is to say that it is self-sufficient (autoFillup).
I have noticed in some comments (not in this thread) that to support an argument, the exception is used and not the rule.
If programming were based on exceptions, trillions of different algorithms would be needed to handle each particular case, thing which @PeterJones once used as an argument in one of our entertaining debates :)
Currently, I am studying the PythonScript manual to put it into practice, something that @PeterJones himself suggested. Until then, It is possible that my answer will take time and end up giving everyone the reason… Will I be able to? ;-)
and it works too (except the last) but when I try it on Notepad++ it finds no matches. What’s going on?
Your regex is looking ONLY for \n whereas normally you would use \r\n which refers to carriage return AND line feed, or \R which means any type of line ending, \n, \r or \r\n .\r\n is the normal line ending in a Windows TXT file.
However the last line will not have these so I’d change your current \n for a $ which means end of line, just before the carriage return and line feed. By not selecting the actual line endings you don’t need to return it as a replacement.
PS you could even use this version of your regex if all the closing brackets finish the line
Just wanted to thank the Alan for his code and instructions and offer a couple of clarifications. This “add on” to NotePad++ has made my work much more productive.
First- When configuring NotePad++ preferences, “Cloud & Link” panel, URI Customized schemes- be aware that the items are separated by a space character. The display on my machine didn’t make this clear and I fumbled around for quite a time before I added a space before the “edit:” addition I made. One might mention that once the preference change is made, the edit URIs in text will start to act like non-working links. Do that first to be sure you got the preference change right.
Two- I am using the UriIndicatorAltClick2.py code because my main use case is opening up images pointed to in my text.
In the startup.py file, I had to add these 2 lines-
Three- I also use lots of non-ASCII unicode in my text, but, so far all my file names are simple ASCII, so I don’t have to worry about the py code handling unicode properly and updating to PythionScript3.x
All of my python dev experience has been with python 3 so I was concerned about whether PythonScript2.0 using Python 2 would cause problems. As far as I can see, the Python 2 stuff is isolated to the one dll installed in the plugin folder.
New plugin v2 is available. Please retest and let me know if something else can be added/changed
It’s traditional to state what has changed, either here or on the release site (and I see nothing in either place). Updates typically have new features or bug fixes that make users interested enough to “go and see”. Without that, and without an easy update mechanism (e.g. through a N++ release, and a new plugin available on Plugins Admin), how many people are going to spend time doing this…
I suppose whether you like your header (.h) files to be considered “C” or “C++” is a matter of individual choice, so I don’t think there’s anything more to do other than what @Ekopalypse has already indicated.
When I invoke Replace, I like to have whatever I’m finding pre-set as my replacement data. Why? Because often I only want to tweak slightly what I currently have. Perhaps think about it in terms of writing code and wanting to give a variable a slightly better name.
This (auto-copy of Find what to Replace with) was actually a feature request for Notepad++ that got suspended to see if it is wanted by other users. That’s the kiss-of-death meaning “not going to be implemented”.
You can read more about the feature request HERE and about the suspension HERE.
Anyway, I shared a script HERE for copying Find what text to Replace with when Replace is invoked. That script is very similar to the FindWithDefaultOptionsSet.py script appearing above in this thread.
For my personal use when Replace is invoked, for “safety” I also like to set the Search mode to Normal and check the boxes for Match whole word only and Match case, which is demonstrated in an inverse sense in the FindWithDefaultOptionsSet.py script.
At the point when I took a gander at config.xml I saw a <FileBrowser> segment which recorded the envelopes I was utilizing as work areas. I understood one of those organizers was exceptionally enormous and when I eliminated it, things accelerated once more. I simply didn’t understand it was examining that catalog each time Notepad++ was opening.
I did not know that sci_selectionduplicate had the double functionality that you describe
Many commands have slightly different functionality if a selection is active (or not) when invoked. Somewhat obviously, the command functionality involves the selection if one is active, typically limiting the command to operating on only the selection.
the description in the … menu should mention both functions
It might be cumbersome visually to see both types of functionality expressed in menu text.