Community
    • Login

    start notepad++ with a search character

    Scheduled Pinned Locked Moved General Discussion
    5 Posts 2 Posters 3.2k Views 2 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.
    • Stuart StevensonS Offline
      Stuart Stevenson
      last edited by

      I would like to open a file at a character location.
      I use an application that puts a marker character in the file when you open the editor while running the application. I would like to put that character in the command line that opens the editor and have the file open at the character instead of the top of the file.
      I did a cursory search in the forum to find this capability.
      I did not find it.
      Is this possible?
      thanks

      Claudia FrankC 1 Reply Last reply Reply Quote 0
      • Claudia FrankC Offline
        Claudia Frank @Stuart Stevenson
        last edited by

        @Stuart-Stevenson

        when providing a file as command line parameter you can also provide
        -nLinenumber -cColumn or -pPosition

        E.g
        notepad++.exe test.txt -n10 -c5

        would open file test.txt. Scroll to line 10 and column 5

        notepad++.exe test.txt -p6

        would set the cursor to position 6 in the test.txt file.

        Cheers
        Claudia

        1 Reply Last reply Reply Quote 0
        • Stuart StevensonS Offline
          Stuart Stevenson
          last edited by

          thanks for the response Claudia

          I understand the first command and result but in the second I don’t know what position 6 is. I that a predefined location or is 6 the search term?

          Claudia FrankC 1 Reply Last reply Reply Quote 0
          • Claudia FrankC Offline
            Claudia Frank @Stuart Stevenson
            last edited by

            @Stuart-Stevenson

            Yes, it’s the location.
            If you open search->goto dialog and choose offset
            you will see where you current cursor is positioned.

            That are the only parameters, afaik, which can be used to locate a specific
            position during startup.

            Cheers
            Claudia

            1 Reply Last reply Reply Quote 0
            • Stuart StevensonS Offline
              Stuart Stevenson
              last edited by

              thank you

              1 Reply Last reply Reply Quote 0

              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