Community
    • Login

    How can I open timestamps?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    14 Posts 7 Posters 1.2k 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.
    • PeterJonesP
      PeterJones @Tural Nevruzov
      last edited by

      @Tural-Nevruzov ,

      What do you mean by “opening” a timestamp?

      Alan KilbornA Tural NevruzovT 2 Replies Last reply Reply Quote 1
      • Mark OlsonM
        Mark Olson
        last edited by

        Does Scintilla even track when edits were made, beyond more coarse-grained questions like “was this edit made before or after the last save”?

        I just glanced through the Scintilla documentation, and I see no reference to such a capability, and I certainly don’t think it’s a feature of Notepad++.

        You could use a scripting plugin like PythonScript to log the current time each time an edit is made, but I don’t see any other way to do that.

        1 Reply Last reply Reply Quote 4
        • Mark OlsonM
          Mark Olson
          last edited by

          I started working on this because I thought it was an interesting idea, and then I realized that dealing with users deleting lines or inserting lines in the middle of the document would just be a huge headache, and the end result would probably be really unsatisfactory.
          Consider:
          If I delete the second and third lines from

          foo
          bar
          baz
          quz
          

          and get

          foo
          quz
          

          in my mind, the fourth line is now the second line, and I want every line number after the third line to be changed to reflect this.

          The problem is that now the time complexity of updating a file’s timestamps is potentially linear in the number of lines of the document, which means that this sort of operation would be really expensive and probably kill the editor’s responsiveness if there were more than a couple hundred lines.

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

            @Mark-Olson

            started working on this because I thought it was an interesting idea, and then I realized that dealing with users deleting lines or inserting lines in the middle of the document would just be a huge headache

            Agree. I would think something like git blame would be the way to go. Not necessarily time stamps but a way to attribute line changes to some type of “commit”.

            Cheers.

            Lycan ThropeL 1 Reply Last reply Reply Quote 2
            • Paul WormerP
              Paul Wormer @Tural Nevruzov
              last edited by

              @Tural-Nevruzov I’m also not sure what you mean. But if your question is: how to enter the current date and time at a certain point in a file? then the answer is easy. Go to Settings>Preferences>Multi-instance & Date and define a custom time and date string. Then go to Settings>Shortcut mapper>“Date Time (customized)” and define a shortcut key (I use the Excel key ctrl+;). Place the caret at the point where you want time and date, hit your predefined key and voilà.

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

                @PeterJones said in How can I open timestamps?:

                What do you mean by “opening” a timestamp?

                I’m pretty sure what the OP wants here is that whenever he makes an edit on a line in his file, the date/time automatically gets filled in for the first columns on the given line.

                Paul WormerP 1 Reply Last reply Reply Quote 2
                • Paul WormerP
                  Paul Wormer @Alan Kilborn
                  last edited by

                  @Alan-Kilborn You are probably right, but if he is editing manually, then hitting ctrl+; before making the edit is a small effort.

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

                    @Paul-Wormer said in How can I open timestamps?:

                    then hitting ctrl+; before making the edit is a small effort

                    Shrug. People want what they want. :-)

                    1 Reply Last reply Reply Quote 1
                    • Lycan ThropeL
                      Lycan Thrope @Michael Vincent
                      last edited by

                      @Michael-Vincent
                      Agreed, this problem from the scant and non-returning author, suggests it’s a Version Control documenting issue, and not an NPP solvable issue other than opening the VC program to save and open the files.

                      1 Reply Last reply Reply Quote 0
                      • Tural NevruzovT
                        Tural Nevruzov @PeterJones
                        last edited by

                        @PeterJones I mean is there a plugin that shows which line was changed and when? A separate time display for each line

                        Mark OlsonM Lycan ThropeL 2 Replies Last reply Reply Quote 0
                        • Mark OlsonM
                          Mark Olson @Tural Nevruzov
                          last edited by

                          @Tural-Nevruzov
                          As we discussed above, it is not feasible to get a timestamp for when each line was changed. It might be feasible to get a timestamp for the last time a line was saved.

                          If you are working with a log file, and most of the lines are added by some external process, Notepad++ cannot help you because even a hypothetical plugin that checked when lines were added could only tell you when lines were added while the file was open in the editor. Rather, you should find out how the log file is being generated and see if there is a way to make the logger show the time when a line was logged.

                          Lycan ThropeL 1 Reply Last reply Reply Quote 0
                          • Lycan ThropeL
                            Lycan Thrope @Tural Nevruzov
                            last edited by

                            @Tural-Nevruzov
                            NO.

                            1 Reply Last reply Reply Quote 0
                            • Lycan ThropeL
                              Lycan Thrope @Mark Olson
                              last edited by

                              @Mark-Olson ,
                              He still doesn’t get it. He doesn’t get that this is not a wordprocessor which MIGHT record those kind of changes within the meta data of the document. Let’s move on.

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