Alternate Editor with remote files

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
Unused
Member
Member
Posts: 122
Joined: 2005-01-19, 20:26 UTC

Alternate Editor with remote files

Post by *Unused »

Normally, I edit the file under the cursor, by pressing the F4 function key. This opens the file in my example with Notepad++. This works also with remote files, opened via SFTP or WebDAV.

But sometimes, I need to edit a file with an alternate editor. For this, I have defined in wincmd.ini the following

Code: Select all

[Shortcuts]
S+F4=em_altedit
In usercmd.ini i have defined:

Code: Select all

[em_altedit]
cmd=C:\path_to_editor\editor.exe
param=%P%N
This seems to work only for local files. But how i can use a alternate editor also with remote files, opened via WebDAV or SFTP?
User avatar
Stefan2
Power Member
Power Member
Posts: 4281
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Alternate Editor with remote files

Post by *Stefan2 »

Have you tried to use "C:\path_to_editor\editor.exe" for the F4-application and see if that alternate editor works there for you.

And vice-versa if Notepad++ works in your UserDefinedCommand.



 
User avatar
Dalai
Power Member
Power Member
Posts: 9974
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Alternate Editor with remote files

Post by *Dalai »

When F4 is pressed on a file in a file-system plugin, TC downloads that file to %TEMP% and launches the editor with the local file in %TEMP% afterwards. Paths to files in file-system plugins can't just be passed to any program because they don't know about the virtual file-system within TC.

What you need is a wrapper like F4Menu, F4MiniMenu or similar.

Regards
Dalai
#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
Unused
Member
Member
Posts: 122
Joined: 2005-01-19, 20:26 UTC

Re: Alternate Editor with remote files

Post by *Unused »

@Stefan2: Yes, i have tested this. It doesn't work.
@Dalai: Many thx. I have found https://ghisler.ch/board/viewtopic.php?t=27573 which seems to do a similar thing. With that, it works at least for my usecases.
Post Reply