Lister showing line numbers

English support forum

Moderators: Hacker, petermad, Stefan2, white

Helge
Junior Member
Junior Member
Posts: 6
Joined: 2003-10-21, 08:23 UTC
Location: Denmark

Lister showing line numbers

Post by *Helge »

It would be a great help if the Lister (activated by F3) could show line numbers to the left !
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

I switched to Linux, bye and thanks for all the fish!
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

So, ghisler could implement it if he wanted to but as he doesn't want to you have to use alternatives:
ListXP or V.

See also http://www.ghisler.ch/board/viewtopic.php?t=4461.

Icfu
This account is for sale
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50386
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

So, ghisler could implement it if he wanted to but as he doesn't want to
That's not the problem! The problem is that in order to have line numbers, lister would have to read the entire file from the beginning to the current position. Currently it reads only a few kbytes around the current position, which makes browsing files of ANY size really fast. If you need line numbers, use hpg_ed or synus/synplus, they are very good foir this, and even support syntax highlighting.
Author of Total Commander
https://www.ghisler.com
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

That's not the problem! The problem is that in order to have line numbers, lister would have to read the entire file from the beginning to the current position. Currently it reads only a few kbytes around the current position, which makes browsing files of ANY size really fast.
I know that, thank you:
http://www.ghisler.ch/board/viewtopic.php?p=34776#34776

SankritFritz' link points to a thread with a statement from you as well, there is no need to repeat the obvious.
If you need line numbers, use hpg_ed or synus/synplus, they are very good foir this, and even support syntax highlighting.
They are good for small files, not huge files.

I mean, why do you think I propose FILE VIEWERS instead of editors? I could as well tell anyone who likes to view a file to use Notepad instead of the lister.

Icfu
Last edited by icfu on 2006-02-09, 19:57 UTC, edited 1 time in total.
This account is for sale
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50386
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

They are good for small files, not huge files.
That's exactly the problem which you would also see when lister supported line numbers directly!
Author of Total Commander
https://www.ghisler.com
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

That's exactly the problem which you would also see when lister supported line numbers directly!
I don't have that problem with ListXP, sorry, but I do have a problem with giving redundant information half a dozen times.

Everything is LINKED, please follow the links if you are interested. Try out ListXP so you know what I am talking about, thanks.

http://www.ghisler.ch/board/viewtopic.php?p=34887#34887
So, all we need is two checkboxes:
-show line numbers in binary mode
-show line numbers in text mode (Attention! File has to be read and will slow down viewing!)

Furthermore TC lister has to read the whole file anyway when using the search, so why not count the CR/LFs at the same time?

ListXP shows that it works even in 500MB files. The file can be viewed and searched already WHILE building the index and summing up the CR/LFs so there is NOT ONE negative aspect for the user.
Icfu
This account is for sale
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50386
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I don't have that problem with ListXP, sorry, but I do have a problem with giving redundant information half a dozen times.
I don't know ListXP myself, but try this: Open a huge log file (a few 10-100 MB) with it and press End or Ctrl+End -> you will have to wait until the entire file has been loaded.
Author of Total Commander
https://www.ghisler.com
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

Open a huge log file (a few 10-100 MB) with it and press End or Ctrl+End -> you will have to wait until the entire file has been loaded.
Ok, one last try, I repeat it another time:
1. ListXP is a viewer, just like the lister. It only displays a small part of a given file at a given time. It does NOT load the entire file but only the part needed.

2. ListXP INDEXES the file and this index is written to disk (if you activate that), so the next time the file is opened it displays the line numbers without *any* waiting time.

3. I proposed to make it OPTIONAL with checkboxes or whatever you can imagine. It can also be a button named "INDEX FILE NOW" so nothing would change in normal lister behaviour but ONLY when user NEEDS line numbering.

Icfu
This account is for sale
User avatar
Lefteous
Power Member
Power Member
Posts: 9536
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2icfu
What about a creating a Lister plugin based on ListXP?
User avatar
MPS
Junior Member
Junior Member
Posts: 90
Joined: 2004-07-27, 15:57 UTC
Location: Poland
Contact:

Post by *MPS »

how about having that line-number feature as an option? switched off by default, but if someone wanted it, they could turn it on in the lister setting - only then would lister 'reload' the file, read the whole thing and add line numbers?
User avatar
majkinetor !
Power Member
Power Member
Posts: 1580
Joined: 2006-01-18, 07:56 UTC
Contact:

Post by *majkinetor ! »

I don't have that problem with ListXP, sorry, but I do have a problem with giving redundant information half a dozen times.
Get used to it....

What do you think, how many times Sans repeated "U can use AutoHotKey for that" sentence ?

2MPS
Please skip this kind of requests... Just waste of time:
MPS wrote:how about having that line-number feature as an option? switched off by default,
99% of addons like this will surely be optional.
What about a creating a Lister plugin based on ListXP?
Well... why do we need Ghisler for this ? I mean, request was to update lister with something fundamental (line numbers) not to write separate plugin
Habemus majkam!
User avatar
Lefteous
Power Member
Power Member
Posts: 9536
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2majkinetor !
Well... why do we need Ghisler for this ? I mean, request was to update lister with something fundamental (line numbers) not to write separate plugin
That was just another idea how to integrate ListXP :arrow:
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

@majki:
Get used to it....
Nope, I will NEVER get used to that. I expect that people who comment in a thread take some time to READ before answering because I am investing some time for posting AS WELL.

@Lefteous:
2icfu
What about a creating a Lister plugin based on ListXP?
Is that possible? How can external applications be integrated in the lister?

I am in favour of workarounds when applicable but not in this case I think. Line numbering is, after having the cursor in TC 7, the next logical step the internal lister should support, for me at least.

Icfu
This account is for sale
User avatar
Lefteous
Power Member
Power Member
Posts: 9536
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2icfu
Is that possible? How can external applications be integrated in the lister?
I didn't thought about using the existing executable but about adapting the ListXP source code to fit into a Lister plugin.
Post Reply