use another editor for "Change Settings File Directly"

English support forum

Moderators: sheep, Hacker, Stefan2, white

Post Reply
User avatar
SkipR
Junior Member
Junior Member
Posts: 63
Joined: 2008-03-27, 10:39 UTC
Location: W. Australia

use another editor for "Change Settings File Directly"

Post by *SkipR »

I would really like to default to an editor that is NOT %windir%\notepad.exe for "Configuration"|"Change Settings File Directly" - can I change which editor is used for this?

What about using the current value of the user defined editor (menu Configuration|Options|Edit/View" ) instead of %windir%\notepad.exe as an override ?
Skip

User avatar
Hacker
Moderator
Moderator
Posts: 11728
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: use another editor for "Change Settings File Directly"

Post by *Hacker »

SkipR,
Currently not possible. You can define a custom button on the button bar, or a custom item in the menu, etc. This restriction exists because someone might have a hex editor defined as the default editor which might be less than ideal in this case. If it's a reasonable restriction or not is a matter of opinion I'd say.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.

User avatar
tuska
Power Member
Power Member
Posts: 2002
Joined: 2007-05-21, 12:17 UTC

Re: use another editor for "Change Settings File Directly"

Post by *tuska »

I have solved this issue with a shortcut [and other settings], e.g.

usercmd.ini

Code: Select all

[em_Wincmd-ini_Edit]
button=
cmd=%COMMANDER_INI%
wincmd.ini - Shortcut: ALT+i

Code: Select all

[Shortcuts]
A+I=em_Wincmd-ini_Edit
Windows key + i -> Apps -> Standard apps -> Select standard apps by file type
Assign file types to specific apps - Name:
.ini
INI file
Click on the icon on the right and select your app (editor).

Configuration -> Options... -> Edit/View: -> Editor for F4

Code: Select all

%COMMANDER_PATH%\Tools\EmEditor-portabel\EmEditorProfessional_64-bit_portabel\EmEditor.exe "%1"

User avatar
Stefan2
Power Member
Power Member
Posts: 2921
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: use another editor for "Change Settings File Directly"

Post by *Stefan2 »

tuska wrote:
2020-06-22, 09:30 UTC
...
cmd=%COMMANDER_INI%
...

And vise-versa for those who need the second setting file too:

%COMMANDER_INI%\..\wcx_ftp.ini







 

User avatar
tuska
Power Member
Power Member
Posts: 2002
Joined: 2007-05-21, 12:17 UTC

Re: use another editor for "Change Settings File Directly"

Post by *tuska »

Stefan2 wrote:
2020-06-22, 10:25 UTC
tuska wrote:
2020-06-22, 09:30 UTC
...
cmd=%COMMANDER_INI%
...
And vise-versa for those who need the second setting file too:
%COMMANDER_INI%\..\wcx_ftp.ini
Thank you for pointing that out.

Interestingly enough, I use "em_command": %COMMANDER_INI% and shortcut ALT+I and only the wincmd.ini file is opened.
The wcx_ftp.ini file remains closed, even though it is located in %COMMANDER_PATH%.
Hmm.

User avatar
Stefan2
Power Member
Power Member
Posts: 2921
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: use another editor for "Change Settings File Directly"

Post by *Stefan2 »

tuska wrote:
2020-06-22, 10:41 UTC
Stefan2 wrote:
2020-06-22, 10:25 UTC
tuska wrote:
2020-06-22, 09:30 UTC
...
cmd=%COMMANDER_INI%
...
And vise-versa for those who need the second setting file too:
%COMMANDER_INI%\..\wcx_ftp.ini
Thank you for pointing that out.

Interestingly enough, I use "em_command": %COMMANDER_INI% and shortcut ALT+I and only the wincmd.ini file is opened.
The wcx_ftp.ini file remains closed, even though it is located in %COMMANDER_PATH%.
Hmm.

Yes, and now? ... your command only refers to the wincmd.ini, so your result seams to work perfectly fine.



You have to open both INIs if you want that. Maybe somehow like this:


[em_Wincmd-ini_Edit]
cmd="%COMMANDER_INI%"

[em_WincmdFTP-ini_Edit]
cmd="%COMMANDER_INI%\..\wcx_ftp.ini"

[em_ConfigChangeIniFiles]
cmd=em_Wincmd-ini_Edit,em_WincmdFTP-ini_Edit



There are probably more ways,.... maybe petermad have some tricks in his extended languages files...


- - -


For others who have not set an other default editor than Notepad.exe as you did,
they can define the wanted editor directly in the user defined command as shown below:

[em_Edit_WincmdINI]
cmd=" "D:\rive\path\to my editor\editor.exe" "%COMMANDER_INI%" "

or more portable:
[em_Edit_wcxFTPini]
cmd=" "%Commander_Path%\myTools\MyEditor\editor.exe" "%COMMANDER_INI%\..\wcx_ftp.ini" "

[em_Edit_usercmdINI]
cmd=" "%Commander_Ini%\..\usercmd.ini" "

[em_ConfigChangeIniFiles]
cmd=em_Edit_WincmdINI,em_Edit_wcxFTPini,em_Edit_usercmdINI


- - -

Can be added to the language *.MNU too

MENUITEM "&Change Settings Files Directly...", 581
MENUITEM "&Change Settings Files Directly... (em_cmd)", em_ConfigChangeIniFiles


TOTALCMD.INC, text file with all TC-internal commands, says:
cm_ConfigChangeIniFiles=581;Open ini files in notepad


- - -


Or create just some buttons (I use no quoting, as I don't have spaces in my paths):
%Commander_Path%\TOOLs\NotePad2\notepad2.exe %Commander_Ini%
%Commander_Path%\TOOLs\NotePad2\notepad2.exe %Commander_Ini%\..\wcx_ftp.ini
But quotes doesn't harm,
so for button use this quoting:
"%Commander_Path%\TOOLs\NotePad2\notepad2.exe" "%Commander_Ini%\..\usercmd.ini"
and for usercmd.ini use this quoting:
" "%Commander_Path%\TOOLs\NotePad2\notepad2.exe" "%Commander_Path%\HISTORY.TXT" "




 

User avatar
tuska
Power Member
Power Member
Posts: 2002
Joined: 2007-05-21, 12:17 UTC

Re: use another editor for "Change Settings File Directly"

Post by *tuska »

2Stefan2
Thank you!
I think I should take a longer break from writing. :(

User avatar
Horst.Epp
Power Member
Power Member
Posts: 3758
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: use another editor for "Change Settings File Directly"

Post by *Horst.Epp »

The easy way to open both ini files is using the command:
cm_configChangeIniFiles
I use NotepadReplacer to replace all calls to notepad to my editor SynWrite.
https://www.binaryfortress.com/NotepadReplacer/
Windows 10 Home x64 May 2020 Update, Version 2004 (OS Build 19041.331)
Intel(R) Core(TM) i7-4770 CPU @ 3.40GH, 16GB RAM
TC 9.51 x64 / x86, Everything 1.4.1.984 (x64)

User avatar
petermad
Power Member
Power Member
Posts: 9660
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: use another editor for "Change Settings File Directly"

Post by *petermad »

2Stefan2
maybe petermad have some tricks in his extended languages files...
No, I only have separate commands for opening the ini files in default editor - but I cover all the basic ini files:

Code: Select all

[em_ext_editwincmd]
cmd=%COMMANDER_INI%
path=%COMMANDER_INI%\..
menu=Edit main ini-file

[em_ext_editwcx_ftp]
cmd=wcx_ftp.ini
path=%COMMANDER_INI%\..
menu=Edit wcx_ftp.ini

[em_ext_editfsplugins]
cmd=fsplugin.ini
path=%COMMANDER_INI%\..
menu=Edit fsplugin.ini

[em_ext_editlsplugins]
cmd=lsplugin.ini
path=%COMMANDER_INI%\..
menu=Edit lsplugin.ini

[em_ext_editpkplugins]
cmd=pkplugin.ini
path=%COMMANDER_INI%\..
menu=Edit pkplugin.ini

[em_ext_editcontplugins]
cmd=contplug.ini
path=%COMMANDER_INI%\..
menu=Edit contplug.ini

[em_ext_editusercmd]
cmd=usercmd.ini
path=%COMMANDER_INI%\..
menu=Edit usercmd.ini
License #524
Danish Total Commander Translator
TC 9.51 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 (1909) 64bit, 'Everything' 1.4.1.965 (x64)
TC 3.0 on Android 6.0
Get:
Extended Total Commander Menus | TC Languagebar | TC Dark Help | PHSM-Calendar

Post Reply