Menu

New Release - NppPlugin_ChangeMarkers

2009-04-05
2012-11-13
  • Thell Fowler

    Thell Fowler - 2009-04-05

    As outlined in an earlier post, the change indicator plugin is now available for release.  As we all know, change indicators have made there way into the N++ source already.  I'm not sure what features that this plugin offers will become part of the official release due to some of my coding decisions and build requirements, yet I believe that each of these features is needed to give the user control.

    This may not need to be stated, but this plugin indicates lines that have changed since the file was loaded, and since it was saved.  These indicators should be accurate across text inserts, deletes, find/replace, undo and redo.

    Features include:
    1. Custom margin icons - you can create a custom icon to place in the margin to indicate saved/un-saved changes in a third party app ( like the free Greenfish icon editor ).
    2. Control over the color of both saved and un-saved markers when using any of the built-in Scintilla markers, or as a line highlighter.
    3. Control over change marker placement -
    - to the left of the line-numbers as a vertical line
    - in the same margin as bookmarks.
    - in the plugin marker margin ( closest to the left of the text area ).
    4. Ability to jump through the un-saved changed lines in a document:
    - Jump up/down to next un-saved changed line.
    - Jump to previous/next un-saved changed line ( in the order changes happened ).
    5. Ability to disable change markers, both on a per document or global level.

    The binary is for Unicode only, the source can be downloaded and built as ansi.

    To install, download the NppPlugin_ChangeMarker_bin zip from the Windows skydrive at:
    http://cid-71a486ea08eb407c.skydrive.live.com/browse.aspx/.Public/NppPluginIface?view=details

    And unzip to your plugins folder.  Start-up Notepad++ and enjoy.

    Looking forward to some feedback,
    almostautomated

     
    • Jan Schreiber

      Jan Schreiber - 2009-04-28

      Thell,

      >Jump prev change by:... Now _THAT_ will be cool.
      Yes, that sounds great.

      >it wouldn't be that hard to add the saved markers to the jumping
      >up and down jump, since that doesn't require tracking marker handles...
      >Would that be helpful though?
      Yes, quite so imo. What I want, among other things, is an easy way to review my changes at the end of a session, to make sure I didn't make some silly mistake. If I could see all of the changes in chronological order, it would be even better, but if severe drawbacks to that exist, never mind.

      Thanks for "listening."

       
      • Thell Fowler

        Thell Fowler - 2009-04-30

        The ability to include saved changes in the Jump: Next Change Up/Down menu items has been added and will be included with the next N++ release.

        The source download will be getting updated as well.

        almostautomated

         
      • Thell Fowler

        Thell Fowler - 2009-04-28

        "Yes, quite so imo. ..."
        OK; I'll see about getting that done before 5.4 is released.

        "What I want, among other things, is an easy way to review my changes at the end of a session, to make sure I didn't make some silly mistake."
        Understandable; although diff'ing to the prior version in your vc might be a better way to go about it. ;)

        "If I could see all of the changes in chronological order, it would be even better, but if severe drawbacks to that exist, never mind."
        At this stage it has severe drawbacks; hopefully Scintilla 1.78 will help make it feasible.

        Thanks for "listening."
        NP; thanks for the feedback!

        almostautomated

         
    • Anonymous

      Anonymous - 2009-04-06

      have had a try
      works smoothly
      thank you, almostautomated!

       
      • Thell Fowler

        Thell Fowler - 2009-04-06

        My pleasure.  Thanks for giving it a try.

        almostautomated

         
    • Fool4UAnyway

      Fool4UAnyway - 2009-04-06

      > The binary is for Unicode only,
      > the source can be downloaded and built as ansi.

      Would it be hard for you to build the ANSI version once?

      That would be more convenient the suggestion for any interested reader to compile the ANSI version themselves.

       
    • Thell Fowler

      Thell Fowler - 2009-04-07

      Both the ANSI and Unicode versions are now available at the link listed above.

      Enjoy!
      almostautomated

       
    • Jens Lorenz

      Jens Lorenz - 2009-04-08

      I would be glad, if you can post this version inclusive the source code on sourceforge. If you like, I can add you as a developer of NppPlugins.

      Best Regards
      Jens

       
      • Thell Fowler

        Thell Fowler - 2009-04-08

        Jens,

        Thank you for the offer, that would be great.

        The source of the ChangeMarkers plugin requires two things that I'm not sure would be acceptable for a project in the NppPlugins project.  The first is that it requires the NppPluginIface project, so that would need to be hosted as well, and it requires a developer to either install the non-compiled headers for boost multi_index_container to build the NppPluginIface or to just use the NppPluginIface.lib.

        If these are acceptable then let's make it happen.

        almostautomated

         
    • Thell Fowler

      Thell Fowler - 2009-04-14

      Jens,

      I used the boost bcp application, as suggested by Joaquín in the NppPluginIface thread to determine which headers we'd need to include with the ChangeMarkers project and there are 1712 of them.

      If we want to move forward on having this project as part of the NppPlugins project I guess the next thing to do is retool the project, but prior to doing that I'd like to find out if Don might rather have the functionality built directly into N++.

      almostautomated

       
      • braimen

        braimen - 2009-04-28

        Dear almostautomated,

        thanks a lot for your great plugin!!
        I have just one issue: can you make it possible, that the plugin remembers the last settings? Your plugin starts always with 'Plugin Marker Margin', so I have to change it manually to 'Line Number Margin' after every start of NP++.
        Would be great if this is possible.

        Best,

        Simon

         
        • Thell Fowler

          Thell Fowler - 2009-04-28

          Simon,

          It should be restoring your previous settings.

          As of right now there are two versions; the original and the one that was included with the new 5.4 RC.  Which are you using?

          If you are using the original version:
          The most likely reason for the previous values to not be restored is user permissions to write to the directory/file where the configuration file was placed.  Previous to the N++ 5.4 N++ did not look in the users app data directory for a plugins associated xml file.  This caused me grief several times in the past and my solution was to create a junction from the install directories \plugins\config that pointed to my app data plugins\config.  Soon you will update to 5.4 so creating the junction now to resolve the problem will likely just be a waste of time.

          If you are using the RC version:
          It should 'just work'.  Can you please forward to me where you are running the notepad executable from, where the NppPlugin_ChangeMarker's xml files is located, and if you have write permissions to the directory/file?

          Thanks,
          almostautomated

           
          • braimen

            braimen - 2009-04-28

            Dear almostautomated,

            Thanks for your fast reply!

            I'm working since today with version 5.4 RC (ANSI) and the problem remains. The plugin is the original one and I'm using the ZIP- (therefore portable) version of NP++. I have write permissions to the folder, but in this case it is an UNC path (the problem seems to be the same with an local path).
            The path to the xml-file is ...Notepad++\plugins\Config\

            I hope this helps,

            Simon

             
            • Thell Fowler

              Thell Fowler - 2009-04-28

              Simon,

              hrrrmmm; I hadn't tested the config location using a share, but I don't think that would present any problems.

              Do me a favor and rename any NppPlugin_ChangeMarker.xml that you can find anywhere on your system to .old or .bak or something.  Then restart N++; the plugin should create a new xml in your plugins\config folder.

              If it reports that the xml is not found then N++ is using the previous version of the plugin ( which can happen if you unzipped the RC over the top of an exisiting install that had the older version of the plugin ).  To resolve and use the new plugin; just delete the NppPlugin_ChangeMarker.dll and re-copy/extract from the RC archive.

              Please let me know if it auto-creates the config or not; and if it still refuses to restore the previous settings.

              Thanks for bringing this to my attention,
              almostautomated

               
              • braimen

                braimen - 2009-04-29

                Hi almostautomated,

                I did as proposed and NP++ reports, that the XML-file cann't be found. So I downloaded the binaries again (from http://cid-71a486ea08eb407c.skydrive.live.com/browse.aspx/.Public/NppPluginIface
                ?view=details; the first link in this forum thread), but they where identical with the existing ones (are these files not the actual ones?). Maybe you can send me a NppPlugin_ChangeMarker.xml file with the settings for 'Line Number Margin'? Than I just copy it to my Config-folder. I don't need to change more to use the plugin.
                Thanks a lot again for your effort!

                Best, Simon

                 
                • Thell Fowler

                  Thell Fowler - 2009-04-29

                  Simon;

                  You are absolutely right that you shouldn't need to be changing more to use a single plugin.

                  From your earlier post:
                  "I'm working since today with version 5.4 RC (ANSI) and the problem remains."

                  Here's what the problem is...
                  The 5.4RC already has the NppPlugin_ChangeMarker included with the zip, and it is version 1.1.0.  The version downloaded from the SkyDrive is version 1.0.0 ( I will not be updating this until after 5.4 OR comes out ).

                  So, when I was saying to delete/rename the existing NppPlugin_ChangeMarker.dll and xpm files that already exist on your system and then place _just_ the dll that is in the zip I am referring to the 5.4RC zip.

                  That should fix the problem.  If not _please_ let me know.

                  almostautomated

                   
                  • braimen

                    braimen - 2009-04-29

                    Hi almostautomated,

                    sorry, I misunderstood your last post. I tried the new plugin from the 5.4 RC-ZIP and it is working fine! Thanks a lot for your help - now I have the full usage of this plugin - great work as I mentioned before!

                    Simon

                     
                    • Thell Fowler

                      Thell Fowler - 2009-04-29

                      Glad to hear it.  Thank you for reporting back that everything is working now.

                       
    • Jan Schreiber

      Jan Schreiber - 2009-04-28

      I love the plugin, and it was a good idea to include it in the 5.4 RC. I wonder if the Jump: Prev Change and Jump: Next change commands could be extended to cover _saved_ changes. I tend to save quite often, and jumping backwards in the change history is much easier than scrolling and looking for the markers in the margin when I want to review what I've done during the active session.

       
    • Thell Fowler

      Thell Fowler - 2009-04-28

      Jan,

      I had originally wanted to do that, yet the over head in tracking the marker handles for saved marks and then processing them for jumping became very noticeable.

      Hopefully with the Scintilla 1.78 version the plugin will actually be able to be rolled into N++ completely and the extra processing for handle tracking wont be as noticeable because the processing of messages and stuff wont be external and duplicated.

      It is planned that for the 5.5 version of the change marker there would be an option ( per document ) to 'Enable Saved Change Jumping', as well as displaying all changed lines in a new view, like the find all option does.

      Another exciting thing; that 1.78 will give the ability to do extra information storing using line annotations.  If a person has a vcs and a plugin is created to populate an invisible annotation with props from a vcs, then those props could also be used for jumping.  ie: Jump prev change by:...   Now _THAT_ will be cool.

      almostautomated

       
    • Thell Fowler

      Thell Fowler - 2009-04-28

      Jan;

      ps - it wouldn't be that hard to add the saved markers to the jumping up and down jump, since that doesn't require tracking marker handles...

      Would that be helpful though?

      almostautomated

       
MongoDB Logo MongoDB