Community
    • Login

    Two suggestions

    Scheduled Pinned Locked Moved General Discussion
    32 Posts 7 Posters 7.5k 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.
    • EkopalypseE
      Ekopalypse @Alan Kilborn
      last edited by

      @Alan-Kilborn said in Two suggestions:

      It is not a hard algorithm…until you consider undo/redo; then it all goes out the window.

      :-D Challenge accepted :-)

      Just to be sure what needs to be done.

      • Mark each line that has been changed since the last save.
      • Once saved, mark them differently.
      • Make sure that Undo/Redo changes the marker accordingly
      • Reload document resets everything
      • No persistence, i.e. at Npp startup there is a clean document aka no markers.

      Anything else?

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

        @Ekopalypse

        I think that covers everything.

        Don’t you have enough on your plate right now; thinking of:

        • themes stuff
        • PySnack
        • column mode prefix / suffix
        • other stuff I’ve forgotten… perhaps something regarding bookmarks… memory fails me
        1 Reply Last reply Reply Quote 3
        • PeterJonesP
          PeterJones
          last edited by

          @Alan-Kilborn said in Two suggestions:

          other stuff I’ve forgotten

          • updating the MESSAGE and NOTIFICATION documentation

          :-)

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

            @Ekopalypse

            Yea! What Peter said too!

            But, seriously, if you could make a changed-lines thingy, and have time to, THAT would be an extremely cool and useful thing. And I’ve got to believe others would fall in love with it too.

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

              Don’t you have enough on your plate right now; thinking of:

              :-D you are right and I should stop doing such thing :-)
              but this one is interesting

              themes stuff
              PySnack
              column mode prefix / suffix
              other stuff I’ve forgotten… perhaps something regarding bookmarks… memory fails me
              You’re right, and I should stop doing that :-), but this is interesting.

              PySnack dies before it’s born. PythonScript
              with Python3 has its first alpha release and it looks very promising.

              Bookmarks … hmm … what did I forget … wait … aren’t we
              waiting for someone else? :-D

              Themes - yes - I am not finished with the theory yet. :-(

              MESSAGE and NOTIFICATION documentation - will certainly be finished this week, and if it means I have to do it on Father’s Day, I will do it.

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

                @Ekopalypse said in Two suggestions:

                Bookmarks … hmm … what did I forget … wait … aren’t we
                waiting for someone else? :-D

                Me?
                I thought I only promised something for THIS and I am still working on it.

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

                  @Alan-Kilborn said in Two suggestions:

                  Me?

                  No, waiting for the OP. :-)

                  1 Reply Last reply Reply Quote 0
                  • dailD
                    dail @Alan Kilborn
                    last edited by

                    @Alan-Kilborn

                    It is not a hard algorithm…until you consider undo/redo; then it all goes out the window.

                    I too once tried to create a plugin to do this. It was several years ago and gave up because of this exact reason.

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

                      C’mon @dail , I haven’t even started and you’re already taking the wind out of my sails. :-D
                      I thought memento pattern + deque list = solution.
                      Phew - I guess I’m screwed now. ;-)

                      dailD 1 Reply Last reply Reply Quote 3
                      • dailD
                        dail @Ekopalypse
                        last edited by

                        @Ekopalypse My naive approach was keep a counter per line. Increment when a change is made or a redo. Decrement when undo.

                        This partially worked but once you start having to keep track of deleted lines, what to do when lines get merged, split, etc.

                        My next attempt was to use the git diff core code to compute diffs in near real time but I didnt ever finish it.

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

                          Hmm … I see, what started to be a nice project while waiting on firmware compilation/update is becoming a “don’t walk alone in the dark and do not go into that lonely woodden cabin”

                          Yes, I have also thought about Python’s difflib and using it together with the stored history of the document to avoid comparing large documents.
                          Hmm… I will try and probably report in two days that I failed miserably. :-)

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

                            Any chance to have a look at LocationNavigate source and see how it handles it (undo/redo)?

                            EkopalypseE Michael VincentM 2 Replies Last reply Reply Quote 0
                            • EkopalypseE
                              Ekopalypse @Alan Kilborn
                              last edited by

                              @Alan-Kilborn said in Two suggestions:

                              LocationNavigate

                              :-D - I’m currently doing this but there are a lot of ???
                              Author seems to use a different encoding.

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

                                @Alan-Kilborn said in Two suggestions:

                                Any chance to have a look at LocationNavigate source and see how it handles it (undo/redo)?

                                What’s wrong with just using Location Navigate? I didn’t see that was a problem above (except lack of 64-bit version). I this just an attempt to implement with a script, or legitimately fix a problem with Location Navigate implementation?

                                Just curious before I potentially throw my hat in the ring …

                                Cheers.

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

                                  @Michael-Vincent

                                  What’s wrong with just using Location Navigate?

                                  Nothing, except:

                                  • It’s overkill for just the changed-lines functionality (I’ve never found any use for the other things – really the advertised main things – that LocationNavigate does)

                                  • It might be easier (says the guy that isn’t doing it) to recreate it than to understand the mass of what is there

                                  • It feels maybe wrong to “take over” someone else’s work (this is a very minor reason)

                                  Your hat is definitely welcome in the ring!

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

                                    @Alan-Kilborn said in Two suggestions:

                                    It’s overkill for just the changed-lines functionality

                                    Agreed. And it’s not 64-bit. And even on 32-bit, it always made N++ crash on exit. So I “extracted” the line marker only parts and made it 64/32-bit in a more simple change lines marker plugin.

                                    @Alan-Kilborn said in Two suggestions:

                                    Your hat is definitely welcome in the ring!

                                    See Changed Lines. Again, it’s pretty much lifted right out of Location Navigate code so I do undo / redo they was Location Navigate does it. It’s not perfect, but works fine for me. One of the many reasons I’m reluctant to “announce” / “release” “my” plugins to the wild - they’re not my original work, they’re just tweaks to others’ and I don’t have the skill to support / fix bugs beyond really simple stuff.

                                    Cheers.

                                    EkopalypseE 1 Reply Last reply Reply Quote 4
                                    • EkopalypseE
                                      Ekopalypse @Michael Vincent
                                      last edited by

                                      Well, that means @Michael-Vincentsaved me the embarrassment then, fine, thank you. :-)

                                      1 Reply Last reply Reply Quote 2
                                      • favdishF
                                        favdish
                                        last edited by

                                        Thanks to all for a lively discussion. I’ll have a look at @Michael-Vincent’s plugin. LocationNavigate seems to do the job, after a quick test, but a plugin for both 32/64 is of course better.

                                        I’ve also discovered another contender, called cudatext. Looks also pretty good, this one, and has the added advantage to work natively with Linux (haven’t tested yet, just from the website blurb). What are the experiences with that one (if I can ask that in an NPP forum :-) )?

                                        EkopalypseE 1 Reply Last reply Reply Quote 0
                                        • EkopalypseE
                                          Ekopalypse @favdish
                                          last edited by Ekopalypse

                                          @favdish said in Two suggestions:

                                          What are the experiences with that one (if I can ask that in an NPP forum :-)

                                          There are tons of editors out there.
                                          VSCode, sublime, atom, geany, notepad2, pspad, eclipse… just to name a few
                                          and they all have their strengths and weaknesses, but in the end it all comes down to one simple question?
                                          Does it offer what YOU need, functionally and design-wise?

                                          1 Reply Last reply Reply Quote 2
                                          • guy038G
                                            guy038
                                            last edited by guy038

                                            Hi, @michael-Vincent and All,

                                            I’ve just downloaded and tried your 32-bits plugin, on my Win XP SP3 with N++ v7.8.5 portable configuration. Wooow, amazing ;-))

                                            I do like :

                                            • The possibility of changing the Margin width and the highlight option, too ( I personally adopted highlight for change marker and default for save marker ! )

                                            • The two shortcuts Ctrl + ALt + Y and Ctrl + ALt + Z which allow to navigate :

                                              • from the beginning of each changed zone, in forward direction

                                              • from the end of each changed zone, in backward direction

                                            • The Changed Lines panel with the ability to double-click on any changed line to immediately move to the exact location in current file, in the same way it is, in the N++ Find result panel !


                                            Many thanks, Michael, for pointing us to this excellent plugin of yours ;-))

                                            Best regards,

                                            guy038

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