Force single Reload from command-line?
-
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,
-
Notepad++ itself doesn’t have a command-line option to force reload of a file.
However, with the
-pluginMessagecommand-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-pluginMessagein 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, likenotepad.reloadBuffer(bufferID): Reloads the given bufferIDnotepad.reloadCurrentDocument(): Reloads the current documentnotepad.reloadFile(filename): Reloads a filename.
… then you could use the
-pluginMessagehook to issue one of the reload commands.
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