Right. The green highlighting has NOTHING to do with a Find action’s result. Find and the Smart Highlighting feature are (almost) totally separate. I say almost because of the unfortunate design decision to have Use Find dialog settings as an option for Smart Highlighting… Sigh…
@Joy-Hon
You could probably script a custom lexer without a huge amount of effort (depending upon your experience level). @PeterJones cites some good references in this thread – see where it says "various custom lexers written in PythonScript: "
@Terry-R is right. I botched the original try at it because I didn’t notice that the replace action didn’t put a space between the lines that were joined. I totally missed that–TWICE! Sorry about that. (Thanks to Terry for pointing that out!)
@Jesse-Mwangi said:
the regex brings all the data in one line
So the reason that it all ends up on one line is that you have a single blank space on the lines that I interpreted as being totally empty from your sample data. I figured this out by downloading your file (otherwise that would have been quite difficult to discover!).
@Jesse-Mwangi, so I presume that @guy038 's help has you on the right track now…please post again if not and we’ll take another look.
@David-Luca
Bug reports and feature requests are filed on github, see a bit more detail on the process here. I’m sure this one already exists for this so logging a new one is pointless and just adds to the massive clutter. Try some searching and then you can add any new input you have about the problem as a comment to an existing issue. You be the judge about the likelihood of this being “fixed” anytime soon when you see the number of open issues.
Hi @terry-r, @guy038 and All
First I want to thank you both: @terry-r and @guy038 - for taking your time and giving me help.
Both solution works - maybe a bit different - but both gives the good results what I was looking for.
Let me say, how much I appreciate the community. Thanks you!
Thanks again guys!
@SalviaSage
Testing is always appreciated in case there are any bugs that show up.
The plugin itself is mostly stable as far as the set of features it has, so theres no immediate plans to add new functionality but that doesn’t others may have ideas I’ve never thought of.
This is very simple. I’m surprised you have not already figured it out. Basically (from your sample) you want to change all spaces to a carriage return/line feed. So each word will be on a separate line.
The regex is:
Find What: \h
Replace with: \r\n
As this is a regular expression you need the search mode in “regular expression” mode and have wrap around ticked.
So the \h is a horizontal whitespace character: tab or Unicode space separator.
The \r and \n are the carriage return and line feed characters.
As a suggestion, read up on regexes by starting with:
https://notepad-plus-plus.org/community/topic/15765/faq-desk-where-to-find-regex-documentation in our FAQ and also by using a regex tester (there are a few on the web) including the one mentioned in that post.
It’s nice to see posters trying to find the solution themselves (especially one as simple as this one), then if in doubt or needing guidance, to come to the forum and show what they’ve tried and their samples.
Terry