"Editor for F4" command agruments

Here you can propose new features, make suggestions etc.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
reinstein
Junior Member
Junior Member
Posts: 21
Joined: 2003-12-13, 11:54 UTC
Location: Israel

"Editor for F4" command agruments

Post by *reinstein »

Is there a way to configure TC to use %P instead of %p for the F4 editor command?
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

AFAIK, TC uses %P if it detects 32-bit editor application and %p if not.
reinstein
Junior Member
Junior Member
Posts: 21
Joined: 2003-12-13, 11:54 UTC
Location: Israel

Post by *reinstein »

This is true if the F4 Editor configuration string is the executable name.
If, however, the string is composed of the command name and some arguments (as in "C:\UE\15.20\uedit32.exe /i=C:\cfg\uedit32.ini") or it is a variable expression (like %Editor%), TC will default to %p.
TC can instead examine the first token in the expanded string, or allow configuring the default behavior (or both).
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I think it would be better if TC will search %p or %P in configured string and insert filename instead, or use default appending if not found. Or at least not to use %p by default if editor file can't be opened and application type can't be detected (e.g. because editor string contains not only editor path).
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Indeed the F4 editor uses %1 for DOS names and "%1" for long names. You can add these yourself to force the one or the other, e.g.

editor.exe "%1"
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

ghisler(Author) wrote:Indeed the F4 editor uses %1 for DOS names and "%1" for long names. You can add these yourself to force the one or the other, e.g.

editor.exe "%1"
That's excellent!
But I think you should note this detail in help file on the "Configuration - Edit/View" page. :)
reinstein
Junior Member
Junior Member
Posts: 21
Joined: 2003-12-13, 11:54 UTC
Location: Israel

Post by *reinstein »

Nice.
Just for the record, I used a workaround in the form of a "batch to exe" converter (http://www.f2ko.de/English/b2e/index.php).
Post Reply