Page 5 of 8

Re: F4 from Lister to Editor

Posted: 2024-01-20, 09:28 UTC
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

Re: F4 from Lister to Editor

Posted: 2024-01-20, 10:49 UTC
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

Re: F4 from Lister to Editor

Posted: 2024-01-21, 11:05 UTC
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?

Re: F4 from Lister to Editor

Posted: 2024-01-21, 11:52 UTC
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?

Re: F4 from Lister to Editor

Posted: 2024-01-21, 12:05 UTC
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.

Re: F4 from Lister to Editor

Posted: 2024-01-21, 12:16 UTC
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.

Re: F4 from Lister to Editor

Posted: 2024-01-21, 12:23 UTC
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?

Re: F4 from Lister to Editor

Posted: 2024-01-21, 16:58 UTC
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.

Re: F4 from Lister to Editor

Posted: 2024-01-21, 17:00 UTC
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.

Re: F4 from Lister to Editor

Posted: 2024-01-21, 18:29 UTC
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.

Re: F4 from Lister to Editor

Posted: 2024-01-22, 08:22 UTC
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.

Re: F4 from Lister to Editor

Posted: 2024-01-24, 08:03 UTC
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?

Re: F4 from Lister to Editor

Posted: 2024-01-24, 08:11 UTC
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

Re: F4 from Lister to Editor

Posted: 2024-01-24, 08:19 UTC
by AntonyD
No - single

Re: F4 from Lister to Editor

Posted: 2024-01-24, 08:51 UTC
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