How can i filter for generic human-readable files?

General discussion related to "Everything".
Post Reply
FunctionDJ
Posts: 2
Joined: Mon Aug 16, 2021 4:12 pm

How can i filter for generic human-readable files?

Post by FunctionDJ »

Normally i use VSCode when i need to search for contents in files, but it takes a few clicks to open the folder that i want to search, and another VSCode window also takes up memory because it's an Electron app.

I recently found out about the content: filter which is very nice, but by default, Everything will search all files, including binary files, unless i specify a file extension. However, i commonly don't know the exact file extension i'm looking for, only the content, and that it's a human-readable / text file. Searching big binary files takes a long time, and i'm not interested in those results anyway.

So my question is: Is there a generic human-readable-files-only or no-binary-files filter?

Thank you very much!
void
Developer
Posts: 16857
Joined: Fri Oct 16, 2009 11:31 pm

Re: How can i filter for generic human-readable files?

Post by void »

The following search will find text/plain files:

ext:a;ans;asc;ascx;asm;asp;aspx;asx;bas;bat;bcp;btm;c;cc;cd;cls;cmd;cod;contact;cpp;cs;csa;csh;cshader;csproj;css;csv;cxx;dbs;def;dic;dos;dsh;dshader;dsp;dsw;efu;ext;faq;filters;fky;fx;gsh;gshader;h;hh;hhc;hlsl;hlsli;hpp;hta;htm;html;hpp;hsh;hshader;htt;htw;htx;hxx;i;ibq;ics;idl;idq;inc;inf;ini;inl;inx;ipp;jav;java;js;json;jsproj;kci;lgn;log;lst;lua;m3u;mak;map;mdp;mk;odc;odh;odl;php;pkgdef;pkgundef;pl;prc;ps1xml;psh;pshader;py;rc;rc2;rct;reg;res;rgs;rul;s;scc;shtm;shtml;sln;slnf;sol;sql;srf;stm;tab;tdl;tlh;tli;trg;tt;txt;udf;udt;url;user;usr;vb;vbproj;vbs;vcp;vcproj;vcw;vcxproj;viw;vsh;vshader;vspscc;vsscc;vssscc;wri;wtx;xml;xsd;xsl;xslt

Add extensions as needed. (these are the default extensions Windows sees as text/plain)

Consider creating a filter:
  • In Everything, from the Search menu, click Add to filters....
  • Change the Name to:
    text/plain
  • Change the Search to:
    ext:a;ans;asc;ascx;asm;asp;aspx;asx;bas;bat;bcp;btm;c;cc;cd;cls;cmd;cod;contact;cpp;cs;csa;csh;cshader;csproj;css;csv;cxx;dbs;def;dic;dos;dsh;dshader;dsp;dsw;efu;ext;faq;filters;fky;fx;gsh;gshader;h;hh;hhc;hlsl;hlsli;hpp;hta;htm;html;hpp;hsh;hshader;htt;htw;htx;hxx;i;ibq;ics;idl;idq;inc;inf;ini;inl;inx;ipp;jav;java;js;json;jsproj;kci;lgn;log;lst;lua;m3u;mak;map;mdp;mk;odc;odh;odl;php;pkgdef;pkgundef;pl;prc;ps1xml;psh;pshader;py;rc;rc2;rct;reg;res;rgs;rul;s;scc;shtm;shtml;sln;slnf;sol;sql;srf;stm;tab;tdl;tlh;tli;trg;tt;txt;udf;udt;url;user;usr;vb;vbproj;vbs;vcp;vcproj;vcw;vcxproj;viw;vsh;vshader;vspscc;vsscc;vssscc;wri;wtx;xml;xsd;xsl;xslt
  • Change the Macro to:
    textplain
  • Click OK.
Now, when you search for textplain: it is replaced with:
ext:a;ans;asc;ascx;asm;asp;aspx;asx;bas;bat;bcp;btm;c;cc;cd;cls;cmd;cod;contact;cpp;cs;csa;csh;cshader;csproj;css;csv;cxx;dbs;def;dic;dos;dsh;dshader;dsp;dsw;efu;ext;faq;filters;fky;fx;gsh;gshader;h;hh;hhc;hlsl;hlsli;hpp;hta;htm;html;hpp;hsh;hshader;htt;htw;htx;hxx;i;ibq;ics;idl;idq;inc;inf;ini;inl;inx;ipp;jav;java;js;json;jsproj;kci;lgn;log;lst;lua;m3u;mak;map;mdp;mk;odc;odh;odl;php;pkgdef;pkgundef;pl;prc;ps1xml;psh;pshader;py;rc;rc2;rct;reg;res;rgs;rul;s;scc;shtm;shtml;sln;slnf;sol;sql;srf;stm;tab;tdl;tlh;tli;trg;tt;txt;udf;udt;url;user;usr;vb;vbproj;vbs;vcp;vcproj;vcw;vcxproj;viw;vsh;vshader;vspscc;vsscc;vssscc;wri;wtx;xml;xsd;xsl;xslt

For example:
textplain: content:"my content"



Everything 1.5 alpha has a content-type:text/plain search option.
FunctionDJ
Posts: 2
Joined: Mon Aug 16, 2021 4:12 pm

Re: How can i filter for generic human-readable files?

Post by FunctionDJ »

Thank you very much for your reply.

Unfortunately, .md, .yaml/.yml, no extension, and custom extensions like .editorconfig or .gitignore are all excluded by that filter.
However setting up a filter with a custom list of non-text-file extensions to exclude like .png, .dll and .ogg will be very helpful.
Post Reply