Page 1 of 8
F4 from Lister to Editor
Posted: 2022-05-24, 12:38 UTC
by matta
Hello,
I've been using TC for a great deal of years and still catching myself trying to use F4 in Lister to edit the current file.
At some point I used AHK for that.
Would it be possible to add such a feature to the next release?
Regards,
Matta
Re: F4 from Lister to Editor
Posted: 2022-05-24, 12:46 UTC
by white
Moderator message from: white ยป 2022-05-24, 12:46 UTC
Moved to Suggestions forum
Re: F4 from Lister to Editor
Posted: 2022-05-24, 13:07 UTC
by Horst.Epp
Edit is not general usefull as it is not the same for different file formats.
I guess that will never be a native TC function.
If you mean edit while viewing source files,
it can be done using the CudaLister plugin.
This allows to change from read-only to write mode while viewing.
Re: F4 from Lister to Editor
Posted: 2022-05-24, 13:37 UTC
by Hacker
Horst.Epp,
Edit is not general usefull as it is not the same for different file formats.
Edit (F4) is always the same (F4 always calls the same editor) regardless of file format.
I support adding F4 as a hotkey that would call the editor defined for F4 with the file currently opened in Lister (perhaps adding an option to specify line and column as command line options when the editor is called from the Lister, and an option to auto-close the Lister).
Roman
Re: F4 from Lister to Editor
Posted: 2022-05-24, 13:56 UTC
by matta
Exactly. Lister's F4 could use the standard TC handler for that.
That was the way I was using it with AutoHotKey - just ran the N++ I had assigned for F4 in TC.
I'm not willing to use AHK on current machine however.
AHK script if anyone is curious:
Code: Select all
; Open Notepad++ on F4 in Lister window.
#IfWinActive,ahk_class TLister
f4::
WinGetTitle,title
StringLen,length,title
StringMid,path,title,11,length-11
WinClose
Run,C:\Program Files (x86)\Notepad++\notepad++.exe %path%,
WinActivate,ahk_class Notepad++
return
Re: F4 from Lister to Editor
Posted: 2022-05-24, 15:46 UTC
by Horst.Epp
Hacker wrote: 2022-05-24, 13:37 UTC
Horst.Epp,
Edit is not general usefull as it is not the same for different file formats.
Edit (F4) is always the same (F4 always calls the same editor) regardless of file format.
Roman
That is the problem, as I said.
You can't use Edit for image or office files for example.
For source files this is no problem and easy without adding scripts if the viewer plugin supports editing.
This is true for CudaLister and Syn2 (only x86).
Re: F4 from Lister to Editor
Posted: 2022-05-24, 18:02 UTC
by Usher
2matta
Actually you can use Alt+F3 for your needs, just define external editors (rater than viewers) associated with needed file extensions.
Re: F4 from Lister to Editor
Posted: 2022-05-24, 18:31 UTC
by Fla$her
Why doesn't anyone mention
AppLoader?

Re: F4 from Lister to Editor
Posted: 2022-05-24, 18:33 UTC
by Horst.Epp
matta wrote: 2022-05-24, 13:56 UTC
Exactly. Lister's F4 could use the standard TC handler for that.
That was the way I was using it with AutoHotKey - just ran the N++ I had assigned for F4 in TC.
I'm not willing to use AHK on current machine however.
AHK script if anyone is curious:
Code: Select all
; Open Notepad++ on F4 in Lister window.
#IfWinActive,ahk_class TLister
f4::
WinGetTitle,title
StringLen,length,title
StringMid,path,title,11,length-11
WinClose
Run,C:\Program Files (x86)\Notepad++\notepad++.exe %path%,
WinActivate,ahk_class Notepad++
return
Your script doesn't work, it returns wrong path to the editor.
Here my working version which uses Akelpad, but this doesn't matter.
Code: Select all
; Open AkelPad on F4 in Lister window.
#IfWinActive,ahk_class TLister
f4::
WinGetTitle,title
left := InStr(title, "[") + 1
right := InStr(title, "]") - left
StringMid, path, title, left, right
WinClose
Run,C:\Tools\AkelPad\AkelPad.exe %path%,
WinActivate,ahk_class Akelpad
return
Re: F4 from Lister to Editor
Posted: 2022-05-24, 19:55 UTC
by Hacker
Horst.Epp,
That is the problem, as I said.
No, that is no problem for the people requesting this functionality.
Roman
Re: F4 from Lister to Editor
Posted: 2022-05-25, 07:49 UTC
by matta
Horst.Epp wrote: 2022-05-24, 18:33 UTC
Your script doesn't work, it returns wrong path to the editor.
Yes. Indeed, apparently the window title has changed since then. Was working at the time I was using it

Thanks for the update.
Re: F4 from Lister to Editor
Posted: 2022-05-25, 08:03 UTC
by matta
Usher wrote: 2022-05-24, 18:02 UTC
2
matta
Actually you can use Alt+F3 for your needs, just define external editors (rater than viewers) associated with needed file extensions.
Not the case. I want to use Lister in the first place (it is lite)
and then edit if needed.
Re: F4 from Lister to Editor
Posted: 2022-05-25, 08:04 UTC
by matta
Re: MultiRenameTool to mark files that match filter
Posted: 2022-05-25, 23:27 UTC
by petermad
Support++ It is fine with me that i can only launch the configured editor for F4 - that's what I would nedd 99% of the time.
Re: F4 from lister to Editor
Posted: 2022-05-26, 05:50 UTC
by nsp
petermad wrote: 2022-05-25, 23:27 UTC
Support++ It is fine with me that i can only launch the configured editor for F4 - that's what I would nedd 99% of the time.
Support++ launching editor from viewer using F4 hotkey and adding menu entries where you can edit (F4) and even launch using internal association...