Text file preview

Discussion related to "Everything" 1.5 Alpha.
Post Reply
vruzin
Posts: 1
Joined: Sun Oct 16, 2022 4:49 pm

Text file preview

Post by vruzin »

I want see (preview) all text files as text... and i want make list off this files... for example

Code: Select all

sass
scss
styl
less
pug
php
js
css
p
cpp
go
mod
so
h
c
ahk
ini
vue
ts
json
md
and others
can you create it?
horst.epp
Posts: 1305
Joined: Fri Apr 04, 2014 3:24 pm

Re: Text file preview

Post by horst.epp »

The config of Everything 1.5 already has a list of files to be viewed as text.

text_plain_extensions=a;ans;asc;ascx;asm;asp;aspx;asx;bas;bat;bcp;btm;c;cc;cls;cmd;contact;cpp;cs;csa;csproj;css;csv;cxx;dbs;def;dic;dos;dsp;dsw;efu;ext;faq;fky;h;hhc;hpp;hta;htm;html;htt;htw;htx;hxx;i;ibq;ics;idl;idq;inc;inf;ini;inl;inx;jav;java;js;json;kci;lgn;lst;lua;m3u;mak;mk;odc;odh;odl;php;pl;prc;ps1xml;py;rc;rc2;rct;reg;rgs;rul;s;scc;shtm;shtml;sol;sql;srf;stm;tab;tdl;tlh;tli;trg;txt;udf;udt;user;usr;vbproj;vbs;vcproj;viw;vspscc;vsscc;vssscc;wri;wtx;xml;xsd;xsl;xslt

Also you can have an Explorer preview handler installed which display sources in a better way.
I have the DelphiPreviewHandler installed.
______________________________________________________
Windows 11 Home x64 Version 22H2 (OS Build 22621.674)
Everything 1.5.0.1323a (x64)
NotNull
Posts: 5107
Joined: Wed May 24, 2017 9:22 pm

Re: Text file preview

Post by NotNull »

This is what I use:

- create a file extensions.list, for example with content:

Code: Select all

sass
scss
styl
less
- In CMD, go to the folder where you put extensions.lst
- On the prompt, run the following command:

Code: Select all

for /f %x in (extensions.llst) do @reg add HKCU\Software\Classes\.%x /v PerceivedType /d text

(I do remember that a couple of extensions didn't work this way. I do have an alternative method if the one above doesn't work for some extensioins.

horst.epp wrote: Sun Oct 16, 2022 5:36 pm The config of Everything 1.5 already has a list of files to be viewed as text.
Not sure, but I thought these were for content indexing and not for previewing files? But if that works too .. all the better :)
void
Developer
Posts: 14861
Joined: Fri Oct 16, 2009 11:31 pm

Re: Text file preview

Post by void »

Everything 1.5.0.1324a will now fallback to the system text preview handler for known text/plain extensions.

You can customize text/plain extensions with the text_plain_extensions ini setting.

-or-

To set the system PerceivedType as text for the file extension in your registry:
  • From the Start menu, search for: regedit
  • Right click Registry Editor and click Run as administrator.
  • Navigate to HKEY_CLASSES_ROOT\.ext
    where .ext is the file extension
  • Create a string value named: PerceivedType
  • Set the string data to: text
(This will make the system text preview handler work in Everything and Windows Explorer)
Post Reply