Page 2 of 3

Re: Text File Preview tabstop

Posted: 10 Jun 2022 17:15
by DennisT
If I remove the commas it behaves exactly the same.

Re: Text File Preview tabstop

Posted: 10 Jun 2022 17:17
by admin
No way. Count the tabs and the spaces, it cannot work.

Re: Text File Preview tabstop

Posted: 10 Jun 2022 17:20
by DennisT
??? There are no spaces in the file. I can generate all the screenshots + text file without the commas if that'll help.

Re: Text File Preview tabstop

Posted: 10 Jun 2022 18:42
by admin
I meant the spaces after the tabs are converted to spaces. It just does not work that way.

Re: Text File Preview tabstop

Posted: 10 Jun 2022 19:39
by Horst
The Universal Viewer together with the CudaLister TC Plugin show it like this:
Screenshot - 10.06.2022 , 19_39_25.png

Re: Text File Preview tabstop

Posted: 10 Jun 2022 19:55
by DennisT
Horst wrote: 10 Jun 2022 12:24 You can use a free Tool like Universal Viewer which displays your file fine.
It also allows you to use all Total Commander Lister plugins.
http://www.uvviewsoft.com/uviewer/download.htm
Can this be used as the viewer in XYP?

Re: Text File Preview tabstop

Posted: 10 Jun 2022 20:02
by highend
Only as an external viewer but ofc you could use it via a CFA (custom file association)

Re: Text File Preview tabstop

Posted: 10 Jun 2022 20:04
by Horst
DennisT wrote: 10 Jun 2022 19:55
Horst wrote: 10 Jun 2022 12:24 You can use a free Tool like Universal Viewer which displays your file fine.
It also allows you to use all Total Commander Lister plugins.
http://www.uvviewsoft.com/uviewer/download.htm
Can this be used as the viewer in XYP?
Only by making a button to start it with the current file like a floating preview
or by making a context menu entry for it.
While you are viewing one file it provides buttons for next and previous file in the current dir.

Re: Text File Preview tabstop

Posted: 10 Jun 2022 20:31
by admin
If File Explorer can show it alright on your system, you might just add (and check) the txt extension to Office Files in Configuration | Preview | Previewed Formats | Categories. Then don't forget uncheck txt in the Text Files category right above Office Files. Then the preview should just work.

Re: Text File Preview tabstop

Posted: 10 Jun 2022 22:03
by PeterH
admin wrote: 10 Jun 2022 09:18 These columns can only be displayed properly aligned if the file is interpreted as a CSV file (commas matter here!). XY can't, and in my opinion it's asking too much of a file manager.

BTW, also File Explorer (Win8.1 at least) cannot do it right.
Hello Don,
it seems there are 2 ways how tabs *can* be interpreted:
1) a tab represents just a defined number of blanc chars
2) a tab inserts blancs up to the next column being a multiple of the tab amount.
(Last is nearest to old typewriters: a tab defines a column, not an amount of space.)

All programs (i.e. editors) I know use the form 2), while you seem to use 1).

I use tabs also for .xys-files - the editors show it as I expect, while XY-preview shows it misaligned.
So I, and it seems others too, would like it in form 2).
Is there a reason for you to use form 1)?

Re: Text File Preview tabstop

Posted: 10 Jun 2022 22:12
by admin
I still don't understand 2). Can you explain the logic in more detail?

Re: Text File Preview tabstop

Posted: 10 Jun 2022 22:51
by PeterH
For Tabs = 4:
if current column (i.e. the col the tab is in) is 1 to 4, a tab moves to col 5
if curr is 5 to 8, a tab moves to col 9
and so on.

I see: I wasn't exact in prev post: each tab moves the current pos to the next column with number n*tab+1 (Leftmost col = 1)

edit: define "current column"

Re: Text File Preview tabstop

Posted: 11 Jun 2022 07:58
by admin
Okay, but that would require line-by-line parsing. Even my Editors EmEditor and Notepad++ don't do it. Too much for a file manager.

Re: Text File Preview tabstop

Posted: 11 Jun 2022 10:57
by admin
I changed my mind about it. Next beta it will work as expected. Was fun to write it. :beer:

PS: I was wrong about the commas. :ninja:

Re: Text File Preview tabstop

Posted: 11 Jun 2022 12:35
by PeterH
Very fine :tup:

Thanks!