Community
    • Login

    Highlight modified text

    Scheduled Pinned Locked Moved General Discussion
    38 Posts 7 Posters 19.6k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Meta ChuhM
      Meta Chuh moderator @Raz
      last edited by Meta Chuh

      welcome to the notepad++ community, @Raz

      yes, the Compare plugin does exactly that, by marking new texts or code as green on the right side, and showing all deleted parts in red on the left, as seen at the screenshot below.

      Imgur

      to refresh the differences while editing, press ctrl+alt+c.

      if you are on notepad++ 7.6.3 or above, you can install this plugin by using the built in notepad++ menu: plugins > plugins admin.
      if you are on notepad++ 7.5.9 or below, you can install it either manually, or by using the old plugin manager.

      1 Reply Last reply Reply Quote 3
      • AZJIO AZJIOA
        AZJIO AZJIO
        last edited by

        Find LocationNavigate plugin

        1 Reply Last reply Reply Quote 1
        • Michael VincentM
          Michael Vincent
          last edited by

          I love LocationNavigate … when it works. It always seems to crash N++ for me. If the bug could be squashed, I’d be using it.

          Alan KilbornA 1 Reply Last reply Reply Quote 2
          • Alan KilbornA
            Alan Kilborn @Michael Vincent
            last edited by

            @AZJIO-AZJIO

            How is LocationNavigate relevant here?

            @Michael-Vincent

            I use LocationNavigate (never crashes for me!) only for its “change marker” feature. I can’t live without that. I think LocationNavigate is only 32-bits and the author no longer cares to support it. How come you didn’t mention this one in the other thread where you talked about porting plugins to 64-bits (maybe because it crashes for you)? Anyway, since you have some plugin skills (apparently), couldn’t you run LocationNavigate code as-is under control of the Visual Studio debugger–maybe get some insight into the crash? Then you could fix it, port it all to 64-bits, and add one more plugin to your list of things you don’t want to take ownership of. :)

            1 Reply Last reply Reply Quote 1
            • Michael VincentM
              Michael Vincent
              last edited by

              I’ve tried, see:

              https://github.com/notepad-plus-plus/notepad-plus-plus/issues/240
              https://github.com/vinsworldcom/nppLocationNavigate/pull/1

              Still crashed N++ on exit. No use in trying to port to 64-bit when 32 doesn’t work for me and others.

              1 Reply Last reply Reply Quote 2
              • AZJIO AZJIOA
                AZJIO AZJIO
                last edited by

                How is LocationNavigate relevant here?

                Direct relationship. The author asked to control the change. Plugin marks modified lines.

                Alan KilbornA Meta ChuhM 2 Replies Last reply Reply Quote 3
                • Alan KilbornA
                  Alan Kilborn @AZJIO AZJIO
                  last edited by

                  @AZJIO-AZJIO

                  You know what, you’re entirely right! I latched onto @Meta-Chuh 's compare explanation because it was very visual (and of course because Meta’s stuff is always so great). But all the OP really wanted was exactly what LocationNavigate’s change-marker feature provides.

                  How about a replacement for just that feature? Esp. since LN seems to have gone unmaintained for a while now. Maybe a Pythonscript could do it. What do you think @Ekopalypse or @Eko-palypse ? At one time I looked into doing it with a PS and it seemed reasonable until you think about Undo and Redo, then it all fell apart. But maybe some other big-thinkers have ideas.

                  Meta ChuhM 1 Reply Last reply Reply Quote 3
                  • Meta ChuhM
                    Meta Chuh moderator @Alan Kilborn
                    last edited by

                    @Alan-Kilborn

                    and of course because Meta’s stuff is always so great

                    lol, epsecialy my typos 😉

                    1 Reply Last reply Reply Quote 1
                    • Alan KilbornA
                      Alan Kilborn
                      last edited by

                      @Ekopalypse / @Eko-palypse

                      Suggestion: If one of your IDs is truly defunct, ask @guy038 as an admin on this site to remove it, or maybe better, combine your old posts with your current id (dunno if that’s possible)?

                      Okay, so do you know the LocationNavigate change-markers? Basically, it puts an orange circle in the margin for any line that has changed since the file has been opened into a N++ tab, and then when the file is saved all of these orange circles get changed to green. So at a point, your file may look like the following. Easy, right? :)

                      Imgur

                      EkopalypseE 1 Reply Last reply Reply Quote 2
                      • EkopalypseE
                        Ekopalypse @Alan Kilborn
                        last edited by

                        @Alan-Kilborn

                        you are a mind reader - that’s what I was starting about to ask :-)
                        OK, sounds reasonable - let me think about it.

                        @guy038, yes, if there is a way to delete the old Eko-palypse account you have my approval to remove it.

                        Alan KilbornA 1 Reply Last reply Reply Quote 2
                        • EkopalypseE
                          Ekopalypse
                          last edited by

                          So lifetime of such markers end when closing npp?
                          I mean, if I do changes on a document and close npp without saving it is not expected
                          to see the markers of those changes once npp restarts, right?

                          1 Reply Last reply Reply Quote 1
                          • EkopalypseE
                            Ekopalypse
                            last edited by

                            What about deleting lines? How is this covered?

                            1 Reply Last reply Reply Quote 0
                            • Alan KilbornA
                              Alan Kilborn @Ekopalypse
                              last edited by Alan Kilborn

                              @Ekopalypse said:

                              if there is a way to delete the old Eko-palypse account you have my approval to remove it

                              Hmm…second thoughts. There are probably some nuggets you composed under that ID. Probably should just keep it. I’ll try to remember which one is current.

                              lifetime of such markers end when closing npp?

                              Yes, for me it is fine. For those people that love to quit N++ and have red tab icons, it is probably not ideal, but forget them, they have bigger issues. :)

                              deleting lines

                              They are gone, can’t see them…no indication they were ever there in this scheme.

                              EkopalypseE 1 Reply Last reply Reply Quote 2
                              • EkopalypseE
                                Ekopalypse @Alan Kilborn
                                last edited by

                                @Alan-Kilborn

                                , they have bigger issues

                                I see, to know that there was a change but you see only NULLs isn’t funny LOL

                                Alan KilbornA 1 Reply Last reply Reply Quote 2
                                • Alan KilbornA
                                  Alan Kilborn @Ekopalypse
                                  last edited by Alan Kilborn

                                  @Ekopalypse

                                  Probably the best way to get a feel for this is to install LocationNavigate and turn on the Mark Changed Line option. If you’re so inclined. 32-bit only AFAIK.

                                  Once exposed, it quickly becomes a feature you can’t live without, IMO.

                                  EkopalypseE 1 Reply Last reply Reply Quote 3
                                  • EkopalypseE
                                    Ekopalypse @Alan Kilborn
                                    last edited by

                                    @Alan-Kilborn

                                    thx - to portable - I’ll give it a try and thx for the hint about 32bit.

                                    1 Reply Last reply Reply Quote 1
                                    • Meta ChuhM
                                      Meta Chuh moderator @AZJIO AZJIO
                                      last edited by

                                      @AZJIO-AZJIO and all

                                      Direct relationship. The author asked to control the change. Plugin marks modified lines.

                                      i disagree. the op requested the changes to be highlighted. (diff)
                                      meaning every single word, section, or character that have been added and or deleted shall be highlighted.

                                      original quote:

                                      I want my changes to be highlighted

                                      as far as i can see while testing, location navigate can not do that.
                                      only complete lines are marked, but not the changed words or sections, in green for added and red for deleted, and deleted text is not shown at all.

                                      can you confirm, or are there settings to achieve a diff view as requested ?

                                      example of deleted and added text diff view in compare:
                                      Imgur

                                      Alan KilbornA 1 Reply Last reply Reply Quote 2
                                      • Alan KilbornA
                                        Alan Kilborn @Meta Chuh
                                        last edited by

                                        @Meta-Chuh

                                        Wow, you are correct again. I wish people’s opinions would stop changing my mind! :)

                                        There’s really 2 schools of thought here, one is a diff from a basis, one is marking lines that are changed on a ternary scheme (no mark=no change, colored-mark: changed since last save, different colored mark: changed since start of session but now saved). Both schemes have value, but at different times.

                                        When I want a diff, I’ll call one up. I want line-has-been-changed marking constantly.

                                        1 Reply Last reply Reply Quote 2
                                        • EkopalypseE
                                          Ekopalypse
                                          last edited by Ekopalypse

                                          As far as I have understood, there are two main functions that LN has.

                                          1. marking lines with changes and
                                          2. jump to historical cursor positions (which is what I always wanted to have but never really started to implement)

                                          That basically means a script needs to provide two lists per buffer
                                          which do get loaded on bufferactivated event.
                                          Filesaved event changes the color of the markers.
                                          Fileclosed event deletes the two lists of that buffer.
                                          And an additional margin, which is used by the markers, needs to be introduced.

                                          Configuration options for cursor positions are

                                          1. position offset (basically when new position is valid to be recorded)
                                          2. limit of how many historical positions are stored

                                          configuration options for marking is what kind of marking to be used

                                          I guess, that’s it - more or less, right?

                                          Alan KilbornA 1 Reply Last reply Reply Quote 2
                                          • Alan KilbornA
                                            Alan Kilborn @Ekopalypse
                                            last edited by

                                            @Ekopalypse

                                            LN has several functions but personally I find only line change markers useful. If you are going to tackle it, why not do this functionality first? Follow the KISS principle. :)

                                            Meta ChuhM 1 Reply Last reply Reply Quote 2
                                            • First post
                                              Last post
                                            The Community of users of the Notepad++ text editor.
                                            Powered by NodeBB | Contributors