F4 from Lister to Editor

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

User avatar
Hacker
Moderator
Moderator
Posts: 13067
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: F4 from Lister to Editor

Post by *Hacker »

Please remember that while options as suggested by hi5 are of course the best solution, they require translation, so they won't be implemented until the next major release (e.g. 11.10 or 11.50).

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.
hi5
Power Member
Power Member
Posts: 551
Joined: 2012-11-03, 11:35 UTC
Contact:

Re: F4 from Lister to Editor

Post by *hi5 »

Hacker wrote: 2024-01-20, 09:28 UTC... require translation ...
That makes sense of course, but the key values / ini settings could already be introduced so for those with a need to adjust the defaults they can already do so by adding these to wincmd.ini themselves (just like with many other settings)
ListerEdit=0|1
ListerEditConfirm=0|1
ListerEditClose=0|1
F4MiniMenu (Forum) - Open selected file(s) from TC in defined editor(s) - A (minimalistic) clone of F4Menu
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 3299
Joined: 2003-05-06, 11:46 UTC

Re: F4 from Lister to Editor

Post by *Sir_SiLvA »

ghisler(Author) wrote: 2024-01-18, 15:12 UTC I have added this to 11.03 RC1 now. Please let me know what you think, and whether you encountered any problems.
When I press F4 on a text-file from an archive I actually expected it to be opened in the editor
(and upon changing that file TC to ask me if I want to repack that file into the archive.
Though I dunno if that's possible to do...)
ghisler(Author) wrote: 2024-01-18, 13:57 UTC F4 will do nothing at all when using a plugin, or when viewing a temporary file, so no side effects.
Sadly not true you get an annoying PLING sound (windows default sounds enabled)
Hacker wrote: 2024-01-18, 22:30 UTC Did anyone here who asked for the functionality envision keeping Lister open upon launching the editor?
I dont expect lister to close upon pressing F4 :!:
petermad wrote: 2024-01-20, 00:57 UTC I thought lister was supposed to stay open.

But perhaps use two shortcuts:
F4 = Open file in editor, keep Lister open
Shift+F4 = Open file in editor, close Lister (switch to editor)
As always, Peter's solution is imho just perfect :!:

@All: if I open a textfile with F3 and then open it in my editor and edit it, should lister not reload that
file automatically instead of me having to press F2 :?:

Christian,
will we get in the future the option to define editors for different file types?
Hoecker sie sind raus!
User avatar
Dalai
Power Member
Power Member
Posts: 9393
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: F4 from Lister to Editor

Post by *Dalai »

Sir_SiLvA wrote: 2024-01-21, 11:05 UTCif I open a textfile with F3 and then open it in my editor and edit it, should lister not reload that file automatically instead of me having to press F2 :?:
AFAIK Lister never reloaded files automatically. Why should that be the case here? Is Lister supposed to reload it every time the file is saved?
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
AntonyD
Power Member
Power Member
Posts: 1249
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: F4 from Lister to Editor

Post by *AntonyD »

Autoreloading - would be a greatest impact in a nearest enhancing of the Lister's behavior.
Because now we can use it with easy for LOG-based files - which change their content frequently and in a background.
#146217 personal license
User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 3299
Joined: 2003-05-06, 11:46 UTC

Re: F4 from Lister to Editor

Post by *Sir_SiLvA »

Dalai wrote: 2024-01-21, 11:52 UTC Is Lister supposed to reload it every time the file is saved?
No after the editor is closed ofc just like when you edit a textfile in an archive an TC asks you if you want to repack the file after you changed the file and closed the editor.
Hoecker sie sind raus!
User avatar
Dalai
Power Member
Power Member
Posts: 9393
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: F4 from Lister to Editor

Post by *Dalai »

So Lister itself would have to wait for the editor to close. What about multi-document editors that aren't closed but just the single file that was added/opened previously?
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
Sombra
Power Member
Power Member
Posts: 811
Joined: 2005-12-27, 22:23 UTC
Location: Zaragoza, Spain

Re: F4 from Lister to Editor

Post by *Sombra »

Maybe the use of F4 when pressing F3 on a directory should be limited. In my case I have notepad++ defined as default editor, at the moment of pressing F4 under Lister, all the files inside the directory, are opened in np++.

Maybe there can be problems if the directory contains many files or some of them have a very big size.
User avatar
Sombra
Power Member
Power Member
Posts: 811
Joined: 2005-12-27, 22:23 UTC
Location: Zaragoza, Spain

Re: F4 from Lister to Editor

Post by *Sombra »

One more point to add a twist: I suggest adding 2 new shortcuts: One to open the file with the associate program in Windows and another to show the "open with" menu. For example F8 and Shift+F8.
User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 3299
Joined: 2003-05-06, 11:46 UTC

Re: F4 from Lister to Editor

Post by *Sir_SiLvA »

Dalai wrote: 2024-01-21, 12:23 UTC So Lister itself would have to wait for the editor to close. What about multi-document editors that aren't closed but just the single file that was added/opened previously?
As said, same behaviour as editing files in archives. When the Editor/Textfile is closed TC should act.
Hoecker sie sind raus!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: F4 from Lister to Editor

Post by *ghisler(Author) »

will we get in the future the option to define editors for different file types?
There are existing solutions for that:
OpenFileTC
TCER
ChoiceEditor
F4menu

Each of them uses a different concept of setting the editor for certain file types, so I recommend trying multiple until you find one that suits you.
Author of Total Commander
https://www.ghisler.com
User avatar
AntonyD
Power Member
Power Member
Posts: 1249
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: F4 from Lister to Editor

Post by *AntonyD »

22.01.24 Added: Option how to handle F4 in lister: wincmd.ini [Lister] F4Edit=1 0=disabled, 1=open editor, 2=like 1, but close Lister when viewing only one file, 3=like 2, but also when viewing multiple files (32/64)
So I've did so.
[Lister]
F4Edit=2
And opened Total after that.
And... nothing changed. Lister's window still remains opened after F4....
Am I doing something wrong?
#146217 personal license
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: F4 from Lister to Editor

Post by *ghisler(Author) »

That's odd, I have just tried it and it works fine. Did you open multiple selected files? Then you need to set
F4Edit=3
Author of Total Commander
https://www.ghisler.com
User avatar
AntonyD
Power Member
Power Member
Posts: 1249
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: F4 from Lister to Editor

Post by *AntonyD »

No - single
#146217 personal license
User avatar
EricB
Senior Member
Senior Member
Posts: 355
Joined: 2008-03-25, 22:21 UTC
Location: The Netherlands

Re: F4 from Lister to Editor

Post by *EricB »

I'm actually seeing the same as AntonyD when having F4Edit=2. But the text file I listed, was opened with a wlx plugin activated. When switching via the Plugins menu to Internal (no plugins) the F4 action is executed.

So it seems that some plugins (maybe even all) may take precedence over the F4 action. In this case Cudalister is brought up for a text file, and IniEdit plugin for an ini file. I host quite some lister plugins... Only switching to Internal will enable the F4 Edit action for these.

HTH, EricB
Last edited by EricB on 2024-01-24, 08:54 UTC, edited 1 time in total.
Post Reply