Lister - small feature request - line and char position
Moderators: Hacker, petermad, Stefan2, white
Lister - small feature request - line and char position
I understand that Lister is not supposed to be full-featured, and I do regularly use View64, or my favorite editor, but I would appreciate it if Lister would show somewhere (maybe in the context menu?) the line and char position of the first selected character.
Usually I simply want to know the number of lines in a file, and sometimes the width of the longest lines.
Thanks,
Jonathan
Usually I simply want to know the number of lines in a file, and sometimes the width of the longest lines.
Thanks,
Jonathan
Re: Lister - small feature request - line and char position
Have you tried any lister plugins? For example: hpg_ed.wlx? It does it.jdmarch wrote:I would appreciate it if Lister would show somewhere (maybe in the context menu?) the line and char position of the first selected character.
http://www.ghisler.ch/board/viewtopic.php?t=1212
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Lister itself cannot do this, because it does not even know this! Why? To know the current line, it would have to read the whole file from the beginning to the current position, and count the line breaks. But lister only reads a small part of the file around the current position. Otherwise it couldn't show very large files very quickly. Try loading a 1 GB file with hpg_ed - tell me how many minutes (or hours?) you wait.I would appreciate it if Lister would show somewhere (maybe in the context menu?) the line and char position of the first selected character.

Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Often (usually?) the current position is reached by scrolling from the beginning of the file. When this is true, Lister could display the desired information, yes?To know the current line, it would have to read the whole file from the beginning to the current position, and count the line breaks.
Thanks,
Jonathan
Normaly, the files where you need the current position of the curser is sourcecode. And source-files normaly are < 1GB 
So I'm still voting for an optional curser (Hotkey 'c' or something) If visible, the curserkeys don't controll scrolling anymore but changing the position of the curser and a statusbar appears with information about line and col. (and maybe ASCII-code in dec/hex of the char under the curser)

So I'm still voting for an optional curser (Hotkey 'c' or something) If visible, the curserkeys don't controll scrolling anymore but changing the position of the curser and a statusbar appears with information about line and col. (and maybe ASCII-code in dec/hex of the char under the curser)
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Why not use the hpg_ed lister plugin, as I suggested? It handles most programming languages, and even supports syntax highlighting!
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
You are right, sorry! I just referred to it with 1 GB files. 

Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
OK, trying to use HPG_ED. I'm sorry to be dense, but I'm having installation problems. I unpacked the HPG_ED files to my Total Cmd directory Y:\util\wincmd\, and (since I'm using TC 5.50) added these 2 lines to wincmd.ini:
[ListerPlugins]
1=Y:\util\wincmd\hpg_ed.wlx
But when I press F3 in TotCmd, it seems that the default lister is still being used for all file extensions. The readme says that HPG_ED will be used "for an associated file" but gives no indication how such an association should be made. The internal viewer configuration Associated Files dialog only permits association with executables, not with WLX files. I restarted TC, no help.
Suggestions? Thanks,
Jonathan
[ListerPlugins]
1=Y:\util\wincmd\hpg_ed.wlx
But when I press F3 in TotCmd, it seems that the default lister is still being used for all file extensions. The readme says that HPG_ED will be used "for an associated file" but gives no indication how such an association should be made. The internal viewer configuration Associated Files dialog only permits association with executables, not with WLX files. I restarted TC, no help.
Suggestions? Thanks,
Jonathan
As I remember it's by default associated with most files it supports (among others: .txt files) - What type of file do you try to view? What extension has it?jdmarch wrote: The readme says that HPG_ED will be used "for an associated file" but gives no indication how such an association should be made. The internal viewer configuration Associated Files dialog only permits association with executables, not with WLX files. I restarted TC, no help.
The plugin has got its ini file - hpg_ed.ini in the directory where wincmd.ini is stored.
Have you checked the [lister plugins] section isn't doubled in the wincmd.ini file?
You can also change the associations from the configuration option in... hpg_ed

- pdavit
- Power Member
- Posts: 1529
- Joined: 2003-02-05, 21:41 UTC
- Location: Kavala -> Greece -> Europe -> Earth -> Solar System -> Milky Way -> Space
- Contact:
SynUs can also be useful to you jdmarch: http://totalcommander.free.fr/
"My only reason for still using M$ Window$ as an OS is the existence of Total Commander!"
Christian Ghisler Rules!!!
Christian Ghisler Rules!!!
For the start, you should unpack it to a separate subdir, like wincmd\Lister Plugins\HPG_ED so your files don't mix up. Then you should install it by starting the Lister (by viewing any file), then Options - Configure - LS-Plugins.
Then we can take a look at why it doesn't work. (BTW: Tried pressing 4 when viewing a supported file?)
HTH
Roman
Then we can take a look at why it doesn't work. (BTW: Tried pressing 4 when viewing a supported file?)
HTH
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
HPG_ED is working for me now. The problem was an undocumented (and apparently little considered) requirement of section [ListerPlugins]: The plugin lines must be numbered with consecutive integers beginning with 0. (The lines need not be physically held in this order, but no integers can be missing in the section.) Following the example in the HPG_ED, I had used number 1, so TC never saw this plugin line, since there was no line 0.
I was using TC 5.50, which required hand-editing of this section. Now that 5.51 automates this process, it should be less of a problem. Nonetheless, I think it should be documented. I also that this is a small bug in TC, as it is normal for missing sequence numbers in registry or INI sections (e.g. in MRU lists) to be handled smoothly.
Thanks,
Jonathan
I was using TC 5.50, which required hand-editing of this section. Now that 5.51 automates this process, it should be less of a problem. Nonetheless, I think it should be documented. I also that this is a small bug in TC, as it is normal for missing sequence numbers in registry or INI sections (e.g. in MRU lists) to be handled smoothly.
Thanks,
Jonathan