'Refresh document in notepad++
I have a php script running which writes to a logfile. I opened the logfile in Notepad++ to see any new content. But i noticed that the content is only refreshing after Notepad++ looses the focus and receives the focus again.
Is there a way to refresh the page manually just like a page refresh with F5 on webbrowsers, or even better, automatically refresh?
Solution 1:[1]
EDIT on 2020-04-10: as per Eric Hirst's comment here below (thanks!) apparently now this feature is mapped out of the box to Ctrl + R.
Yes, the Reload from Disk
feature is built-in. By default it's not mapped to any keyboard shortcut, though, so you will have to do it yourself:
Settings -> Shortcut mapper
then choose Modify
and map it to your favorite hotkey. Mine is usually mapped to Ctrl + R.
Solution 2:[2]
@Milan Pandey solution is perfect.
Just in case some one don't want to auto update all files but only single file then easiest solution would be,
Note - In case if icon not available then View -> Monitoring(tail -f)
I frequently use it to monitor changes in log files.
Solution 3:[3]
Notepad++ has a file monitoring option that is designed for log files. The following extract from the release notes describes the facility and how to use it.
Notepad++ 6.9.2 released
18 May 2016 01:23:00
Log Monitoring is one of most wanted features. It is in v6.9.2 now. As indicated its name, Log Monitoring allows users to monitor log files' writting, update by scrolling to the last line while every modification, just like Unix command "tail -f". Click on "eye icon" on toolbar or use menu "View->Monitoring (tail -f)" to activate/disactivate this command
Solution 4:[4]
If you want to enable auto reload of file, Go to:
Settings -> Preferences -> MISC.
And click on "Update silently" check box, under "File Status Auto-Detection"
Solution 5:[5]
I found out an easier way. There is this eye sort of icon on the toolbar (right next to the record button). Click that and it refreshes automatically!
Solution 6:[6]
I love Notepad++ but it's not good at automatically detecting file changes in the file system.
I'm a java developer and I use log4j to write log files and I'd love it to pick up changes in the log files automatically, and not have to whether:
- manually reload the file
- minimize the app to detect the changes
- change tabs
- right-click the file tab and click reload
A few years ago I opened a bug about it, but the main dev replied that the problem is my app, not Notepad++. And BTW, at that time, the problem was it would not detect the screen output from PuTTy redirected to a log file.
Anyhow, the setting you want is at:
Settings > Preferences > MISC. > File Status Auto-Detection
Solution 7:[7]
The accepted answer is fine, but if you don't use that feature so often and you don't want to remember a shortcut, you can find the button in the menu under File
-> Reload from Disk
:
Solution 8:[8]
The eye icon which says Monitoring(tail -f) on the toolbar does the job for me..It automatically upload it silently and also go to the EOF to see any running logs but this has to be done for each file that is opened as it monitors the file that is getting updated.
Solution 9:[9]
I think this post would be the most appropriate answer to your needs.
It gives as setting within notepad++ to auto refresh and there is also an option to go to the end of the updated logs.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | |
Solution 2 | Vitron |
Solution 3 | |
Solution 4 | Milan Pandey |
Solution 5 | learner |
Solution 6 | |
Solution 7 | Galya |
Solution 8 | Pratyush Kumar Das |
Solution 9 | Gulzar |