Suggestion: per file follow/autoupdate feature
I’m quite new to notepad++, so I may have missed some obvious features.
I’m quite happy with the working open file autoupdate feature.
However, looking at often changing files, the dialog gets nasty.
I know how to switch the entire feature off but wouldn’t it be a good idea to switch it on or off per file via hotkey or context menue?
I think I understand what you mean, but I am not sure. If you edit a file which then changes outside NP++, then it will update the contents of the file on screen as soon as that file becomes topmost. However, this only happens if you haven’t altered the file in question inside the editor. Surely this makes sense - you don’t want your edits to be erased because of an auto update!
Perhaps you are doing something that ‘updates’ the file in some non-obvious and unintentional way.
A workaround I sometimes use that may help is to access the the “often changing files” over the network… npp only sees changes to files made locally!
I think the issue is that the “The file has been modified by another program” dialog pops up even if the modified file in question is not the active npp document - this certainly bugs the hell out of me :)
Typical scenario for me is having a log file and source file (that I am editing) open in npp…
- I save my changes to the source in npp (so the source is my current active npp doc)
- Switch (Alt-tab) to another app to test the changes
- Switch back to npp… and BAM modal dialog “The file has been modified” and the log file is now the active doc - so I have to click OK and Ctrl-Tab back to source (which should have remained the active document).
I only want to be notified that the log file has been “modified by another program” when the log file is the active npp document (or next time I switch to the log file in npp).
I don’t use “Update silently” since it means the “Find results” links to lines in the silently updated files can get de-synced and point to the wrong place without any clue that the file is updated.
“Update silently” also does not really help in cases where I have edited the log file in npp (so the dialog again steals focus).
I’m not sure a “per file follow” setting would be useful to me (and in fact care would be needed to manage which docs you were following and which not).
I think a 3rd “File Status Auto-Detection” preference would help:
☒ Notify only when document is active
☒ Silent (notify only if document has been edited in npp)
Other related enhancements could be a visual indication that the file has been silently updated (perhaps ^ instead of the * you get for docs with unsaved changes). Similarly a per-line indication in the “Find results” windows for lines in the silently updated file.