Community
    • Login

    Open text file and jump to the end

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    10 Posts 4 Posters 3.9k Views 1 Watching
    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.
    • Rahan BölzerR Offline
      Rahan Bölzer
      last edited by

      Hey Guys, can i open a text file like a log File and jump automaticly to the end of the file?
      Maybe with a aditional parameter. Or with nen start macro.
      I know i can press Strg+End, but other people dont know this.

      PeterJonesP Alan KilbornA Michael VincentM 3 Replies Last reply Reply Quote 0
      • PeterJonesP Offline
        PeterJones @Rahan Bölzer
        last edited by PeterJones

        @Rahan-Bölzer ,

        That feature is not built into Notepad++ as far as I am aware.

        To get an “[on] start macro”, you could use a plugin like PythonScript, and add editor.documentEnd() to startup.py, with the PythonScript > Configuration setting Initialisation: ATSTARTUP

        <edit>: That will only get it in the first active window. If you also want it every time you load a new file, you’d also have to define a callback for NOTIFICATION.FILEOPENED (there are some examples of callbacks in the PythonScript docs after you install the plugin)</edit>

        1 Reply Last reply Reply Quote 1
        • Alan KilbornA Offline
          Alan Kilborn @Rahan Bölzer
          last edited by Alan Kilborn

          @Rahan-Bölzer said in Open text file and jump to the end:

          I know i can press Strg+End, but other people dont know this.

          I think you mean Shift+End , but it could be that “Strg” is a non-English keyboard thing that I’ve never heard of.

          Anyway, Shift+End is a keycombo that works in most Windows programs – wouldn’t it be a good idea to educate other people about how things work?
          That seems to me like the best solution.

          PeterJonesP 2 Replies Last reply Reply Quote 2
          • PeterJonesP Offline
            PeterJones @Alan Kilborn
            last edited by PeterJones

            @Alan-Kilborn said in Open text file and jump to the end:

            I think you mean Shift+End

            I think you mean Ctrl+End. By default, Shift+End selects to the end of the line. By default, Ctrl+End moves the cursor to the end of the document

            60289620-f782-40f8-a251-1aef599fe21e-image.png

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

              @PeterJones said in Open text file and jump to the end:

              I think you mean Ctrl+End

              Yep, oops.

              That shows how little I think about it – I just DO IT!
              If you learn it and train yourself in its use early on, it becomes second-nature muscle-memory.
              One more argument for educating the masses.

              (I think I was thrown in what I was typing by OP’s use of “Strg” which made me think of “Shift”).

              Regardless, where I said Shift in my previous post, replace with Ctrl !
              Sorry.

              1 Reply Last reply Reply Quote 2
              • PeterJonesP Offline
                PeterJones @Alan Kilborn
                last edited by

                @Alan-Kilborn said in Open text file and jump to the end:

                it could be that “Strg” is a non-English keyboard

                Specifically, according to a quick search, Wiki says it’s German keyboards, being the abbreviation for “Steuerung”.

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

                  @PeterJones said in Open text file and jump to the end:

                  Wiki says it’s…

                  The key part of that:

                  …(thus e.g. “Ctrl” is translated to its German equivalent “Strg”, for Steuerung).

                  1 Reply Last reply Reply Quote 0
                  • Michael VincentM Offline
                    Michael Vincent @Rahan Bölzer
                    last edited by Michael Vincent

                    @Rahan-Bölzer said in Open text file and jump to the end:

                    and jump automaticly to the end of the file

                    It’s a bit “hacky”, but could you just use the -n command line argument and put in a ridiculously large number (i.e., greater than the number of lines in your file)?

                    For me, opening a 2827 line file with:

                    notepad++.exe -n1000000000 file.txt
                    

                    puts the cursor on the last line of that file.

                    Note: Windows 10 64-bit, Notepad++ 7.9 64-bit

                    Cheers.

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

                      @Michael-Vincent said in Open text file and jump to the end:

                      It’s a bit “hacky”, but could you just use the -n command line argument

                      I 💙 this solution.
                      I don’t see it as “hacky”.
                      Well…
                      I don’t see it that way because we’re all about “hacks” here. :-)

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

                        @Alan-Kilborn said in Open text file and jump to the end:

                        I don’t see it as “hacky”.

                        I was hoping -1 (negative one) would be like “last array element” and bring me to the last line, but it didn’t work. I would think that would be “less hacky”.

                        :-)

                        Cheers.

                        1 Reply Last reply Reply Quote 4

                        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                        With your input, this post could be even better 💗

                        Register Login
                        • First post
                          Last post
                        The Community of users of the Notepad++ text editor.
                        Powered by NodeBB | Contributors