Menu

Selection Highlighting

2009-07-13
2013-04-11
  • ApologetixFan

    ApologetixFan - 2009-07-13

    I know this is probably a noob question (though I've been using NPP for years now), but when I select a word or text in a document, all the same words or text are highlighted. Why is it doing that, and what can I do with that (i.e. can I change or replace all the highlighted instances at once)?

     
    • Michel Merlin

      Michel Merlin - 2009-07-18

      Don HO 2009-07-17 22:49 GMT linked an isolated message. Please readers, either ignore it, or see it *in context*: https://sourceforge.net/forum/forum.php?forum_id=331753&thread_id=1929727 . As you can see (despite the thread is, probably not inadvertently, botched, with some messages hidden or removed, others unthreaded yet shuffled), I came friendly and helpfully and was very badly received, with no apparent or told reason, hence (given none else is plausible) for politico-racial reasons.

      Now yes, despite what I had noticed then ("but I instantly dropped any hope of any fruitful exchange", 2008-02-12 13:47 GMT), I was fool enough to try again to help this year... stupid me.

      Now here please readers avoid at least one of the goals of these permanent harassments: don't let you divert from the issue and from the solution I proposed above on 2009-07-17 11:47 GMT in « Set "Selected text colour" to "lime" » (and to which BTW none brought so far a better or matching alternative or any improvement; e.g. the "transparency" solution above is not reaching IMO the same clarity and reliability), and its implied continuation for the developers (first change the *default* color to "lime" right now, 2nd spend a little time to tune up that color later).

      I recall (NPPP team being gratuitously full of unwarranted and insincere hatred against me doesn't prevent from noticing what's good in their work) that Notepad++ has a very efficient scheme of detection of matching objects (searched items, brackets, tags, etc) *and* of coloring them. Which implies finding a set of colors that outlines correctly all these different objects, which in turn is of course more difficult than for old simple less powerful sets, so it couldn't be done in one day, and currently some different items have too similar colors, which makes work more difficult, uncertain and tiring than necessary. Currently when you "Ctrl+H" (Find and Replace) for the string:

      "/

      to be replaced with (fictive example):

      "http://www.yahoo.com/

      and this throughout a long HTML document, then of course you need to check *each* occurrence carefully before choosing "Find" or "Replace" for *that* occurrence; sometimes the selected « "/ » ensemble is to be NOT replaced, fictive example:

      < ... "http://news.yahoo.com/s/ap/20090718/ap_on_go_pr_wh/us_obama_health_care"/ >

      yet that selected item is very small, colored in a sort of light gray, and framed or even overlapped by a couple other items, also colored in 2 or 3 other sorts of light grays; which, for a choice to be made many times hence quickly, is eye-tiring and unreliable; with "lime" all the problems of this kind are removed (tested for a few days).

      Now a few other more annoying problems remain in this good detection-selection-coloring system, which prevent from RELYING on it, at least in long documents. I will post reports and suggestions about it - if I am not prevented or slowed down too much this time.

      (Sorry for the words above that will seem nasty and lengthy to someone unaware of the precedents; unfortunately they were necessary given the context; I hope no more of them may be necessary in the future...)

      Versailles, Sat 18 Jul 2009 18:57:25 +0200

       
      • Don HO

        Don HO - 2009-07-19

        > NPPP team being gratuitously full of unwarranted and insincere hatred against me...

        That's ridiculous : how can we have such feeling agaist you? We don't even know you.

        Don

         
      • Fool4UAnyway

        Fool4UAnyway - 2009-07-18

        Why don't you just shut up and start working on your own editor?

        You seem so convinced that you know best... Why are you trying to convince others which apparently isn't getting any success at all?

         
    • cchris

      cchris - 2009-07-15

      Because Smart hihlighting is turned on. Turn it off in the Setings, if it bothers you.

      The higlighting does not imply you can replace everything at a keystroke. However you can always use Search/Replace to do that.

      CChris

       
    • Michel Merlin

      Michel Merlin - 2009-07-17

      "NPPP > Settings > Style Configurator > Language: Global Styles, Style: Selected text colour > Colour Style > Background color", click the square (initially somewhat gray) and chose the clear bright vivid green square (which is #00ff00, i.e. "lime").

      That way when 10 occurrences are *highlighted*, the one *selected* will be clearly outlined.

      Sure this color choice has a few drawbacks, but they are IMO just aesthetical; anyway, TIA to anyone who would spend the time and find a better one.

      BTW, Notepad++ writes sometimes "colour", sometimes "color". This denotes a lacking sense of clarity, exactitude, reliability, friendliness, mind openness, care to others - that resurfaces in plenty areas of the program (accordingly severely reducing the program's reliability) and of the discussions on this forum, where people are too often nitpicking instead of straightforwardly correcting and immediately and kindly thanking for the report or suggestion. No surprise when seeing this good program so badly hampered by a series of bugs or lacks that never get done after months or years of polite reports or requests from users.

      Now I know this is useless: such people will infinitely bash me and argue instead of just acknowledging, rolling their sleeves up, and actually working.

      Versailles, Fri 17 Jul 2009 13:47:00 +0200

       
      • Fool4UAnyway

        Fool4UAnyway - 2009-07-17

        >> "
        BTW, Notepad++ writes sometimes "colour", sometimes "color". This denotes a lacking sense of clarity, exactitude, reliability, friendliness, mind openness, care to others - that resurfaces in plenty areas of the program (accordingly severely reducing the program's reliability) and of the discussions on this forum, where people are too often nitpicking instead of straightforwardly correcting and immediately and kindly thanking for the report or suggestion. No surprise when seeing this good program so badly hampered by a series of bugs or lacks that never get done after months or years of polite reports or requests from users.
        << "

        Wow! Everything is so clear to you. If you notice one little inconsistency, you immediately what psychological disorders people that did work on a program suffer from. Everything is caused by a huge number of problems and causes or will result in big trouble and almost makes Notepad++ unusable. Well, that indeed is pretty much what you think, if I read all your useless posts. You can't seem te be satisfied by simply reporting a problem, no you make a big problem of it, so there SHOULD be something done about it, and IMMEDIATELY.

        You know, it's a BIG SURPRISE to me that you are still using Notepad++ and posting on these forums. Why are you so insistent if you know it won't matter at all, because nothing will be done about it actually?

        Well, there is one way you could get things to be done: start working on and coding for Notepad++ yourself. Did you consider this? Or are you only complaining and waiting for others to things that you find so important?

        I think the best you could do is start using an other editor. I haven't much users complain in the way you do and also showing no effort at all to do something about problems themselves.

         
      • Don HO

        Don HO - 2009-07-17

        > No surprise when seeing this good program so badly hampered by a series of
        > bugs or lacks that never get done after months or years of polite reports or requests from users.

        We talked about this long time ago, and I think my answer is quite clear :
        https://sourceforge.net/forum/message.php?msg_id=4772560

        If you prefer to make someone else get the job done for you, you could ask gently at least.
        Otherwise you could always stick with the version which suites you. Fair enough?

        Don

         
      • Jocelyn Legault

        Jocelyn Legault - 2009-07-17

        michelmerlin,

        Thank you for your input.
        Some of us do care about the quality and polish of the code.
        The grammatical inconsistencies you've noted are indeed annoying and inconsistent (color being US and colour being Canada & UK). 
        I'll try to do a text sanitation pass before the next major release. However, I don't have the last word on what goes in the official repo or not, so I can't guarantee it will make it to the release..

        As for the selection highlight problem, I haven't really looked at it, but my feeling leads me to believe that it could probably be a Scintilla issue more than a N++ issue.  If you have time, could you check if that behavior is present in SciTE? If it is, then the Scintilla project should be notified. If not, well, this should be our to look at.

        thanks,

        joce.

         
    • cchris

      cchris - 2009-07-18

      There is a way to make "highlighted selected" distinct from "highlighted": set the transparency of the selection background to something quite opaque, but not entirely so, in order to get some blending effect. A "selection translucency" slider might be added to the relevant lobal style tab. And one for current line highlighting, while we are at it. I use synthetic macros to achieve this, but they have the drawback of requiring one macro per hardcoded parameter value.

      CChris

       
    • cchris

      cchris - 2009-07-19

      I would suggest you start actually working, Michel.

      In Styler Configurator, near the top, there is a theme selector dropdown. This lets you choose between a now wide variety of colouring schemes, and smart highlithging / selection background / Mark using 1st style etc are just some parts of it. Just inspect what the righthand list looks like when selecting Global styles.

      Please browse through the themes, and see if some is better suitable for your needs than the default. It all depends on your eyes and monitor colour sensitivity, one size will never fit all. Theme files have the same structure as styler.xml, or rather styler.xml is just the default theme file.

      Then when you find something you almost like, you can tweak it. If it is not convenient to tweak it from the dialog, you can open the xml file and play around with it. And when you are happy, with some combination that will be perect for you, and won't be for your neighbour, you can even share it, for it to be distributed along the others.

      Isn't that more constructive? I can't think of more control for the user - not to mention the transparency thing or other tricks that are hidden in Scintilla documentation, but still available?

      CChris

       
  • Michel Merlin

    Michel Merlin - 2013-04-11

    Set DIFFERENT colors for "Selected" and "Smart-Highlighted"

    Please readers ignore the pollution and jump to my suggestion of Fri 17 Jul 2009 11:47:00 GMT above, not bested so far despite my calls, and that I repeat again:

    "NPPP > Settings > Style Configurator > Language: Global Styles, Style: Selected text colour > Colour Style > Background color", click the square (initially somewhat gray) and chose the bright vivid green square (which is #00ff00, i.e. "lime").

    That way when 10 occurrences are highlighted, the one selected will be clearly outlined.

    Sure this color choice has a few drawbacks, but they are IMO just aesthetical; anyway, TIA to anyone who would spend the time and find a better one.

    and please don't lose time with the lengthy condescending speeches from people so badly ill with NIH or RTC that they not only rant instead of work, but swap the roles with the ones who really (try to) help.

    (For the ones who really love rants and quibbles, please just compare the 1st and last phrases in my Fri 17 Jul 2009 11:47 GMT above, with CChris' attempts to rewrite them under his name in his last post before this one, and make your own POV over who is more "actually working" or "constructive")

    Versailles, Thu 11 Apr 2013 13:55:00 +0200

     

    Last edit: Michel Merlin 2013-04-11
  • Michel Merlin

    Michel Merlin - 2013-04-11

    Why editing a theme is more efficient IMO than browsing existing ones

    Here are more details. Only useful if you want to dive deeper; doesn't change anything, for a quick and reliable fix, to my conclusion of Thu 11 Apr 2013 11:55:00 GMT above.
    (The following is written in Windows 7 64bit Ultimate; a few adaptations are probably needed in other versions of OS or Notepad++).

    First, why I found cchris' reply of 2009-07-19 not efficient enough:

    (1) Few users will spend the time to follow the path "NPPP > Settings > Style Configurator > Select theme :".

    (2) Even less will when only described as "In Styler Configurator, near the top, there is a theme selector dropdown". People know that descriptions this imprecise are often not actually verified, thus too often result in too much time spent unsuccessfully trying, so they drop trying it. Better spend the additional seconds it takes to write and check an accurate, up-to-date and exact description as in §1 above.

    (3) Even even less will actually "browse through the themes" when seeing they are 20: they may be afraid of losing time on each try with 1st saving and last recovering their own personal settings (short of a "Save As" button in the "Style Configurator" dialog).

    This is where I had stopped; I must admit I hadn't gone further when I posted my reply of Thu 11 Apr 2013 11:55:00 GMT above. Then when finally trying I found that cchris' suggestion is more feasible than I had feared:

    (a) Fist, let's open in NPPP a file with a string repeated 5-6 times. The string may be one word (e.g. "Vivaldi"), of which if possible at least 2 occurrences on the same line; or better a longer string that would include a few line breaks. That file once prepared:

    (b) User settings, even when NOT explicitly saved, are actually kept (in "%APPDATA%\Notepad++\stylers.xml"), and are NOT overwritten by tests, hence are immediately recovered by simply selecting back the "Default (stylers.xml)" theme.

    (c) Theme is immediately seen when selecting it, entirely with its regular text, selected (string), outlined line (line containing the selection), smart-highlighted. Only to test repeated "Find" do you need to "Save & Close" the chosen theme, and even then, reverting is instant.

    The above a-b-c make tests very quick and efficient. Now for the results, unfortunately in the 20 themes:

    (A) 13 FAIL to show sufficiently visible DIFFERENCES in highlightings of selected and smart-highlighted text between them, or sometimes with regular text or outlined line: Bespin; Black board; Choco; khaki; Mono Industrial; Monokai; MossyLawn; Navajo; Obsidian; Plastic Code Wrap; Twilight; vim Dark Blue; Zenburn

    (B) 7 SUCCEED:

    • Deep Black (but white characters on black BG won't please everyone. Good outlining line, good HTML entities)
    • Hello Kitty (black on pink, good outlining line, good HTML entities)
    • HotFudgeSundae (Olive-like on Dark Brown)
    • Ruby Blue (but white on dark blue)
    • Solarized-light (light gray on light pink, yet manages to make everything different while really printable and easy on eyes; however general lack of contrast)
    • Solarized (light blue on dark blue)
    • Vibrant Ink (but white on black)

    Now of these 7, only 2 (in bold above) are (IMO) usable in real world (others are too dark thus would spend too much ink when printing, or have too soft contrasts); those 2, while nice and carefully designed, are rather particular and won't fit everyone.

    In addition, the 20 preset themes are stored each in its file under "C:\Program Files (x86)\Notepad++\themes", while the default theme (see above) is inside the file "%APPDATA%\Notepad++\stylers.xml", so it is not obvious how you copy the default into a new theme file (say "Merlin_stylers.xml") and personalize that one.

    Once all explored, I confirm that cchris' suggestion ("In Styler Configurator, near the top, there is..."), while better than I expected, is NOT (IMO) as quick and useful as mine of Fri 17 Jul 2009 11:47:00 GMT above, so I confirm my conclusion of Thu 11 Apr 2013 11:55:00 GMT above.

    Please excuse me for being unable to explain this shorter. However I tried to make it clear and quick to read, so I think that some precision and details may sometimes help save time (and quibbles between people who otherwise could agree).

    Versailles, Thu 11 Apr 2013 18:52:00 +0200

     

    Last edit: Michel Merlin 2013-04-11
MongoDB Logo MongoDB