F4 from Lister to Editor
Moderators: Hacker, petermad, Stefan2, white
Re: F4 from Lister to Editor
Not my case. I've tested with NO plugins - with fresh INI.
Maybe we should get some special LOG records for this new functionality?
Maybe we should get some special LOG records for this new functionality?
#146217 personal license
Re: F4 from Lister to Editor
@AntonyD
Just to make certain: you used a fresh ini, with the F4Edit line added. Did you also configure the Editor for F4 in Preferences -> Edit/View -> Editor for F4?
Edit:
Nevermind, I see that notepad.exe is configured by default in a fresh ini.
For me it will open the editor with a fresh ini and no plugins.
Edit2: when adding Cudalister plugin, the F4 action stops functioning
Just to make certain: you used a fresh ini, with the F4Edit line added. Did you also configure the Editor for F4 in Preferences -> Edit/View -> Editor for F4?
Edit:
Nevermind, I see that notepad.exe is configured by default in a fresh ini.
For me it will open the editor with a fresh ini and no plugins.
Edit2: when adding Cudalister plugin, the F4 action stops functioning
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: F4 from Lister to Editor
That has been discussed before: F4 is disabled when viewing a file with a plugin, because the user may have started editing the file with the plugin, and there is no way to make the plugin save the file first. Also F4 may already be used by the plugin for other functions. When the user switches to text view, they will usually be asked by the plugin to save the file.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.
But AntonyD seems to have the problem that the editor opens but Lister doesn't close.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: F4 from Lister to Editor
And I missed that part. Comprehensible, but it also makes the F4Edit of little use in my case (nearly all files are opened with a plugin), unless I specifically switch back to the No plugin view.ghisler(Author) wrote: 2024-01-24, 09:10 UTC That has been discussed before: F4 is disabled when viewing a file with a plugin, because the user may have started editing the file with the plugin, and there is no way to make the plugin save the file first. Also F4 may already be used by the plugin for other functions. When the user switches to text view, they will usually be asked by the plugin to save the file.
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: F4 from Lister to Editor
Just press 1 and then F4, where is the problem?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: F4 from Lister to Editor
But AntonyD seems to have the problem that the editor opens but Lister doesn't close.
exactly.
Hmmmm... One my mistake and One strange question have arose.
So, first of all, I should apologize for the confusion I caused.
Everything works as it should on a completely clean system. Verified.
My case turned out to be a little more complicated. I completely forgot that I have an external F4MiniMenu "interceptor".
And it turned out that this functionality that was added to the Total/Lister code was not needed by me


Because F4MiniMenu somehow, when the Lister window is open, can call the default text editor
and provide it with the full path to the file opened in Lister as input. EVEN if the plugin is running there

As a result, this very surprising situation was revealed only now, which I regret. So much time
I had it on hand, but I didn’t use it


But it also adds a question to the Lister/Total code. Shouldn't its built-in support for the F4 shortcut have taken precedence?
over the one implemented in an external application? Why did the other application turn out to be “stronger” in this case?
#146217 personal license
Re: F4MiniMenu (AHK): F4Menu w. Drag&Drop, filelist, cmdline (XYPlorer, Everything, Explorer, Double Commander)
2hi5
viewtopic.php?p=448572#p448572
probably you should take a look into this thread.
Probably a new inconvenience we've got after got implemented this:
viewtopic.php?p=448572#p448572
probably you should take a look into this thread.
Probably a new inconvenience we've got after got implemented this:
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)
#146217 personal license
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: F4MiniMenu (AHK): F4Menu w. Drag&Drop, filelist, cmdline (XYPlorer, Everything, Explorer, Double Commander)
Just set F4Edit=0 to disable the new function.
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:
Re: F4 from Lister to Editor
Normally when an external application intercepts a hotkey, it does that before the main application gets to see the hotkey.Shouldn't its built-in support for the F4 shortcut have taken precedence?
over the one implemented in an external application?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: F4MiniMenu (AHK): F4Menu w. Drag&Drop, filelist, cmdline (XYPlorer, Everything, Explorer, Double Commander)
2ghisler(Author)
introduced into the Lister/Total code. BUT! The nuance is that a VERY useful addition has been made for Lister in the form
of F4Edit=2! Thus, even if I switch to call corresponding external editor for a file opened in Lister through the capabilities
that exist in this application - I would very much like to receive from the author of F4MiniMenu the option for a similar action:
essentially get support for the essence of the F4Edit=2 and\or F4Edit=3 options.
This is worth doing ONLY if I just want to switch to the existing F4MiniMenu functionality of which was just now (11.03 RC2)Just set F4Edit=0 to disable the new function.
introduced into the Lister/Total code. BUT! The nuance is that a VERY useful addition has been made for Lister in the form
of F4Edit=2! Thus, even if I switch to call corresponding external editor for a file opened in Lister through the capabilities
that exist in this application - I would very much like to receive from the author of F4MiniMenu the option for a similar action:
essentially get support for the essence of the F4Edit=2 and\or F4Edit=3 options.
Last edited by AntonyD on 2024-01-25, 07:57 UTC, edited 1 time in total.
#146217 personal license
Re: F4 from Lister to Editor
I use F4Menu (TC's editor field set to: %COMMANDER_PATH%\TOOLS\F4Menu\F4Menu.exe) and have no problems with the F4Edit=2 setting closing Lister. So F4MiniMenu must be doing something unexpected.AntonyD wrote:My case turned out to be a little more complicated. I completely forgot that I have an external F4MiniMenu "interceptor".
But I see another problem. If several files are selected when pressing F3 or Shift+F3, and I press F4 in the Lister window (Text view mode 1), then my editor is opened with all the selected files, also if Lister is only opened with one of the files.
This happen because after pressing F3 all the files are still selected - and F4Menu is set up to open all seleted files in multibple instances my text editor.
If I manually go back to TC (Lister still open), and remove the selections, then only the file actively shown in lister is opened in the editor. This happens even if Lister is opened in one-file mode (Shift+F3 by default).
Either Lister should alvays only pass the shown file to the editor - at least when Lister was opened in one-file mode - or it should be configuralbe to always only open the displayed file.
I have configured F3 to always only open the file under the cursor.
If I select several files and press F3 on one of these files, only that file is opened in Lister. If I then press F4, all the selected files are passed to the editor - that is unexpected.
If I select several files and press F3 on a file that is not selected, still only that file is opened in Lister, and if I press F4, only that file is opened in the editor, as expected
If I select several files and press Shift+F3 on one of these files, all of the files are loaded into Lister. When I press F4 all the selected files are passed to the editor - that can be argued as expected, but I would prefer if only the shown file is passed.
If I select 3 files and press Shift+F3 on one of these files, all of the files are loaded into Lister. If I go back to the file panel ad deselect the last selected file, and go back to Lister and press F4, only the currently shown file is passed to editor.
If I select 3 files and press Shift+F3 on one of these files, all of the files are loaded into Lister. If I go back to the file panel ad deselect the second selected file, and go back to Lister and press F4, then the first and the third file are passed to editor - unexpected
If I select 3 files and press Shift+F3 on one of these files, all of the files are loaded into Lister. If I go back to the file panel ad deselect the first selected file, and go back to Lister and press F4, then the second and the third file are passed to editor - unexpected
If I select 3 files and press Shift+F3 on one of these files, all of the files are loaded into Lister. If I go back to the file panel ad deselect all the selected files, and go back to Lister and press F4, then the displayed file (of the 3) is passed to editor - as expected.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: F4MiniMenu (AHK): F4Menu w. Drag&Drop, filelist, cmdline (XYPlorer, Everything, Explorer, Double Commander)
Off-topic for that thread: but no, that is intended behaviour of "normal usage" of F4MiniMenu[1], it is an always running hotkey program that monitors F4 several TC windows (Panels, Lister, Find files results). F4MiniMenu isn't "setup" as editor in TC (but helper program F4TCIE can).
In the next update monitoring Lister and Find files results can be turned on/off, and a F4Edit>1 setting will be taken into account (e.g. close Lister).
[1] There is also a Passive mode - https://github.com/hi5/F4MiniMenu#passive or one can choose to only use the helper program F4TCIE https://github.com/hi5/F4MiniMenu#setup-f4tcie - in both these cases accessing the settings, adding new/modifying editors, DocumentTemplates are not (easily) possible.
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)
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: F4 from Lister to Editor
F4Menu.exe would have to be updated to support F4 in lister: It would have to check whether the calling window is Total Commander or Lister, and only check for selected files if it's really Total Commander.
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:
Re: F4 from Lister to Editor
I found a solution: You will be able to set a different editor for F4 invoked from Lister:
wincmd.ini
[Lister]
Editor=<your editor> "%1"
wincmd.ini
[Lister]
Editor=<your editor> "%1"
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:
Re: F4MiniMenu (AHK): F4Menu w. Drag&Drop, filelist, cmdline (XYPlorer, Everything, Explorer, Double Commander)
In RC3 I will keep the Lister window open half a second after launching the editor, this way it should be easier for third party tools to determine that they were not launched from the main TC window.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com