Skip to content

Instantly share code, notes, and snippets.

@bartelink
Last active January 4, 2016 09:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bartelink/8599967 to your computer and use it in GitHub Desktop.
Save bartelink/8599967 to your computer and use it in GitHub Desktop.
Ugly hacky script to generate a VS Find in Files uber-Filter
# TODO dig out of registry instead of cutting and pasting from VS!
$x="*.c;*.cpp;*.cxx;*.cc;*.tli;*.tlh;*.h;*.hh;*.hpp;*.hxx;*.hh;*.inl;*.rc;*.resx;*.idl;*.asm;*.inc;*.tlh;*.h;*.hh;*.hpp;*.hxx;*.hh;*.inl;*.rc;*.resx;*.idl;*.asm;*.inc;*.cs;*.resx;*.resw;*.xsd;*.wsdl;*.xaml;*.xml;*.htm;*.html;*.css;*.vb;*.resx;*.xsd;*.wsdl;*.htm;*.html;*.aspx;*.ascx;*.asmx;*.svc;*.asax;*.config;*.asp;*.asa;*.cshtml;*.vbhtml;*.css;*.xml;*.xml;*.xsl;*.xslt;*.xsd;*.dtd;*.srf;*.htm;*.html;*.xml;*.gif;*.jpg;*.png;*.css;*.disco;*.txt;*.json;*.vb;*.resx;*.xsd;*.wsdl;*.htm;*.html;*.aspx;*.ascx;*.asmx;*.svc;*.asax;*.config;*.asp;*.asa;*.cshtml;*.vbhtml;*.css;*.xml;*.cs;*.resx;*.resw;*.xsd;*.wsdl;*.xaml;*.xml;*.htm;*.html;*.css"
$x+=";*.fs;*.json;*.ts"
# strip *.
$all = $x.Split( ";") | % { $_.Replace("*.","") }
#xml fins too much junk in obj dirs
$all = $all | ? { $_ -ne "xml" }
$vsFifFilter = [string]::Join(";", ($all | sort | unique | %{ "*."+$_ }))
$grepwinFilter = [string]::Join("|", ($all | sort | unique | %{ "("+$_+")" }))
# $vsFifFilter | clip
# $grepwinFilter | clip
@bartelink
Copy link
Author

Would be nice to have lots of JS tooling extensions in too (coffee for a start)

And then it would be nice if they could debug find in files and allow you to omit bin and obj dirs etc.

http://stackoverflow.com/questions/6357067/alternatives-for-find-in-files

Result:

*.asa;*.asax;*.ascx;*.asm;*.asmx;*.asp;*.aspx;*.c;*.cc;*.config;*.cpp;*.cs;*.cshtml;*.css;*.cxx;*.disco;*.dtd;*.fs;*.gif;*.h;*.hh;*.hpp;*.htm;*.html;*.hxx;*.idl;*.inc;*.inl;*.jpg;*.json;*.png;*.rc;*.resw;*.resx;*.srf;*.svc;*.tlh;*.tli;*.ts;*.txt;*.vb;*.vbhtml;*.wsdl;*.xaml;*.xsd;*.xsl;*.xslt

And

(asa)|(asax)|(ascx)|(asm)|(asmx)|(asp)|(aspx)|(c)|(cc)|(config)|(cpp)|(cs)|(cshtml)|(css)|(cxx)|(disco)|(dtd)|(fs)|(gif)|(h)|(hh)|(hpp)|(htm)|(html)|(hxx)|(idl)|(inc)|(inl)|(jpg)|(json)|(png)|(rc)|(resw)|(resx)|(srf)|(svc)|(tlh)|(tli)|(ts)|(txt)|(vb)|(vbhtml)|(wsdl)|(xaml)|(xsd)|(xsl)|(xslt)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment