Community
    • Login

    start notepad++ with a search character

    Scheduled Pinned Locked Moved General Discussion
    5 Posts 2 Posters 2.7k 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.
    • Stuart StevensonS
      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 1
      • Claudia FrankC
        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
          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
            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
              Stuart Stevenson
              last edited by

              thank you

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