Community
    • Login

    Force single Reload from command-line?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 2 Posters 70 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.
    • Dev NullD Offline
      Dev Null
      last edited by

      Hi All,

      I’m wondering if there is any way to force notepad++ to reload a file from the command-line?

      Note that I’m not looking for the -monitor arg; These are large logfiles updated continuously, so if I turn on the monitor function it basically locks up notepad++ with continuous updates. And I’m not looking for the gui command to Reload, because I want to use it from a script. I’d like to choose to reload a specific file, once, from the command-line. I don’t see an arg for it in the list from --help; just wondering if there’s a sneaky workaround or something I missed.

      Thanks for any advice,

      PeterJonesP 1 Reply Last reply Reply Quote 0
      • PeterJonesP Online
        PeterJones @Dev Null
        last edited by

        @Dev-Null ,

        Notepad++ itself doesn’t have a command-line option to force reload of a file.

        However, with the -pluginMessage command-line-argument, you could set up a script for the PythonScript plugin that could handle that (search the forum for some of the recent posts on -pluginMessage, and you should find a script and instructions that gives an example of handling the -pluginMessage in PythonScript – or here’s a dummy test script that I made some time ago in response to this discussion). But since PythonScript has some reload commands, like

        • notepad.reloadBuffer(bufferID): Reloads the given bufferID
        • notepad.reloadCurrentDocument(): Reloads the current document
        • notepad.reloadFile(filename): Reloads a filename.

        … then you could use the -pluginMessage hook to issue one of the reload commands.

        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