How to automatically reload modified files in Notepad++

193,898

Solution 1

You can disable the confirmation in the settings:

Settings -> Preferences -> MISC. -> Update silently

enter image description here

Solution 2

There is a nice plugin called Document monitor (Can be found and installed from the Plugins => Plugin Manager => show Plugin Manager menu),

It updates the opened files every 3 seconds. Together with the option to "scroll to last line after update", it will have the ability to "tail" a log file as wanted.

After the plugin installation don't forget to activate it by clicking:

Plugins => Document monitor => start to monitor

Solution 3

For monitoring an individual log file, use the View > Monitoring (tail -f) option (thanks to https://superuser.com/a/1246651/17025).

This will keep the file up to date, and also keep the end of the file visible (which is not always exactly what you want); it also is a setting for each individual file rather than a global setting.

This approach is not usable if you want to edit the file as well - it keeps it in read-only mode.

Solution 4

Both of the above commands are not working properly.

There is a command in the File menu, 'Reload from disk' which works perfectly.

I have made a shortcut Alt + R which makes it very handy. Yet, not automatic though.

Share:
193,898

Related videos on Youtube

mjsr
Author by

mjsr

Updated on September 18, 2022

Comments

  • mjsr
    mjsr almost 2 years

    How can automatically reload modified files in Notepad++? The confirmation step is annoying, and is completely unnecessary in some situations.

  • sakra
    sakra over 11 years
    That's one badly named setting ...
  • Tim Sparkles
    Tim Sparkles over 11 years
    Note that as of v6.3, "Update silently" only updates the file when its tab receives focus. Search functionality therefore accesses the old buffer and might show inaccurate results.
  • R-D
    R-D over 10 years
    Does not answer the question. The asker is looking for a way to suppress the dialog that asks if you want to reload and do this automatically.
  • Franck Dernoncourt
    Franck Dernoncourt almost 10 years
    I wish NotePad++ had a few more 'Yes all' buttons.
  • Martin Vseticka
    Martin Vseticka over 9 years
    Good heavens. The confirmations almost made me mad. Thanks!
  • Seidleroni
    Seidleroni over 9 years
    +1 for for a great plugin. This is exactly what I need. Better than accepted answer.
  • Chris Marisic
    Chris Marisic almost 9 years
    The "scroll to the last line after update" setting may also be helpful for log viewing scenarios.
  • qedstar
    qedstar over 8 years
    @Roald van Doorn: The answer to the question is that there is no solution YET. Praveen gave the next-best solution that is possible NOW.
  • rinuthomaz
    rinuthomaz almost 8 years
    +1 but if we keep open the file it wont update, will have to alt+tab to update.. thats is something not good
  • Jon
    Jon over 7 years
    Now there is a monitoring function build into notepad++ since version 6.9.2
  • Stefan van den Akker
    Stefan van den Akker over 7 years
    To expand on @Jonathan727 and save everyone a click: "Click on "eye icon" on toolbar or use menu "View->Monitoring (tail -f)" to activate/disactivate this command".
  • Mathias
    Mathias over 7 years
    should be the accepted answer...
  • Sopalajo de Arrierez
    Sopalajo de Arrierez over 6 years
    @Mathias : not without the link to the referred plugin.
  • Mathias
    Mathias over 6 years
    @SopalajodeArrierez : Notepad++ has a built in plugin manager. Therefor it is not necessary to provide a link. Also it is well described how to install the plugin. Anyway if you want to have a link here's the source code sourceforge.net/projects/npp-plugins/files/DocMonitor
  • Sopalajo de Arrierez
    Sopalajo de Arrierez over 6 years
    Thanks for the link, @Mathias . This plugin seems to be only working on 32 -bit versions of NotePad++ . And there is no such "Plugins => Plugin Manager => show Plugin Manager menu" on v7.5.1.
  • Mathias
    Mathias over 6 years
    didn't noticed that. Maybe you have to ask your self: "Why do I need the 64 bit version of notepad++?". If you don't find any valuable answers but something like: "Because it's state of the art to go for 64-bit" or "I think 64 is better" I would simply install the 32 bit version and use the plugin system. Otherwise you could still brew your own notepad++ including the plugin into the source. Good luck with that option ;-)
  • Thomas Weller
    Thomas Weller over 6 years
    Seems not to work from network folders
  • Regis Portalez
    Regis Portalez about 6 years
    I'd love a setting to update only the currently opened document...
  • oldboy
    oldboy almost 6 years
    document monitor is never listed under plugins for me... :((((
  • Christo
    Christo almost 6 years
  • Ryan
    Ryan over 5 years
    If you prefer to enable it just for one open file (rather than a global setting): superuser.com/a/1246651/74576
  • wick
    wick over 5 years
    Is update frequency programmable?
  • Pawan Patil
    Pawan Patil over 5 years
    excellent !!! confirmation dialogue is extremely irritating
  • kkarakk
    kkarakk about 5 years
    @Mathias literally EVERY company tells you to install 64bit if you have a 64 bit OS, it is ingrained learned behavior .why would you assume someone would try the 32 bit version of the same software after the 64 bit version fails to demonstrate that functionality?
  • Mathias
    Mathias about 5 years
    @kkarakk since I've made this comment a lot has changed. Notepad++ has now a built in monitor option (--> plugin is not needed any longer). However back then the 64 bit version had no plugin manager and the monitor option was also not there, so the easiest way was to install the 32 bit version and having plugins. That's why. The OS has nothing todo with the programm. 64 bit programms just can consume more than roughly 2GB of memory. BTW a lot of apps, services, etc. are still compiled in x86.....
  • DrOnline
    DrOnline about 5 years
    As of 7.6.6 you can set 'update silently' and 'enable for all opened files'.
  • Derek_6424246
    Derek_6424246 about 5 years
    This answer is buried, but is by far the most correct solution. It uses a built-in feature, doesn't disable warnings for all other files, and doesn't require installation of a 3rd party plugin. Hopefully this gets more attention and votes!
  • Jason Angel
    Jason Angel about 4 years
    This approach will also set your file as read-only (which is bad in my current case)
  • Intrastellar Explorer
    Intrastellar Explorer about 4 years
    This works without the focus on Notepad++. Nice!
  • endolith
    endolith almost 4 years
    Does this automatically update even if there are unsaved local changes that conflict with the remote changes?
  • endolith
    endolith almost 4 years
    This doesn't let you edit the file
  • xjcl
    xjcl over 3 years
    I think there is a built-in shortcut Ctrl + R
  • Sébastien
    Sébastien about 3 years
    Way more convenient than opening a Powershell window and running Get-content pathToLogfile -Tail 0 -Wait :)
  • Brooklynn99
    Brooklynn99 over 2 years
    this works but for me when I enable it, the application is throwing an error saying that the log file can't be accessed due to another system currently using it.
  • rajesh
    rajesh about 2 years
    This should be the accepted answer