I have some log files which I want to highlight automatically if they have certain error messages in them as only 1 in 10 will have an error or so and I don't want to keep opening them/searching each time.
So I've setup a saved search:
search for: log.txt
find text, regex 2: (error|fault|crash|etc)
when doing a normal search (alt-F7) it works. When I use this to "Define Colors by Filetype", select the saved search, it only applies the search for e.g. simply highlights all "log.txt" files but does not use the "find text". Not all log.txt files have errors so highlighting them all is not what I want.
What am I missing? Or isn't it possible (yet).
Define colors by type: saved regex text search?
Moderators: Hacker, petermad, Stefan2, white
Define colors by type: saved regex text search?
F4MiniMenu (Forum) - Open selected file(s) from TC in defined editor(s) - A (minimalistic) clone of F4Menu
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
Re: Define colors by type: saved regex text search?
I guess searching in files isn't done when coloring files for speed reasons, i.e. it would be (very) slow just to refresh a directory.
Regards
Dalai
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Re: Define colors by type: saved regex text search?
mmm but with a "file mask" such as log.txt there will always only be one for each folder and they are <10kb logs (in my case) so quick to "read".
So probably have to prepare a script which would add a file comment which then could be used for the "define colors by filetype", but that always means an additional step (unless I "watch" for the creation of log.txt in the background). Not ideal.
So probably have to prepare a script which would add a file comment which then could be used for the "define colors by filetype", but that always means an additional step (unless I "watch" for the creation of log.txt in the background). Not ideal.
F4MiniMenu (Forum) - Open selected file(s) from TC in defined editor(s) - A (minimalistic) clone of F4Menu
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
Re: Define colors by type: saved regex text search?
Use TextSearch plugin - http://totalcmd.net/plugring/textsearch.html
Re: Define colors by type: saved regex text search?
Thanks for the hint: PCREsearch does the trick as well, I had forgotten about it.
F4MiniMenu (Forum) - Open selected file(s) from TC in defined editor(s) - A (minimalistic) clone of F4Menu
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
Re: Define colors by type: saved regex text search?
So perhaps as a suggestion: when a saved search is used for "Define Colors by Filetype" show a warning/information message indicating that "Not all rules of this saved search will be applied" when it includes an option that isn't "valid" - in this case the TC RegEx 2 search.
There might be other options that wouldn't work for the "Define Colors by Filetype".
There might be other options that wouldn't work for the "Define Colors by Filetype".
F4MiniMenu (Forum) - Open selected file(s) from TC in defined editor(s) - A (minimalistic) clone of F4Menu
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
Re: Define colors by type: saved regex text search?
I don't think the RegEx 2 search is the issue but the searching for text as such. Some kind of hint/warning would be good, though.
Regards
Dalai
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror