Total Commander Edit Redirector

Version 1.4.2.0

Addon for Total Commander that allows to edit files in different editors depending on the extensions.

Author:Konstantin Vlasov, 2022
Homepage:http://flint-inc.ru/
E-mail:support@flint_inc.ru

Distributed under Artistic License 2.0.

System requirements:

Description

Using editor in Total Commander has some limitations, particularly:

There are different ways of solving these problems, but none of them is flawless. TCER is another attempt of finding a compromise.

The program is opened by pressing F4 and automatically redirects file opening into an appropriate editor. If several files are selected they will all be opened, otherwise the focused file (the one under cursor) will be opened. See also the Restrictions of the program section.

Installation

To install the program copy it into any directory. The configuration file tcer.ini (see below for the description) should be located either in the same directory, or (if this directory is write-protected) in the directory where the main configuration file of TC (wincmd.ini) lies.

After that open the Configuration dialog in TC, select the page "Edit/View" and specify the full path to the tcer.exe file in the "Editor" field. Configuring the program itself is performed via manual editing of the INI file. It is recommended to use TCER of the same bitness as TC (i.e., 32-bit TCER with 32-bit TC, and 64-bit TCER with 64-bit TC). If this requirement is not met editing files from redirected paths (like system32 directory) may open a different file from what you see in TC.

Сonfiguration file

[Configuration] General program settings section.
MaxItems=256 When the number of selected files exceeds the number specified here, additional confirmation request will be displayed. The value 0 turns it off.
MaxShiftF4MSeconds=2000 To distinguish between F4 and Shift+F4 TCER checks the timestamp. If the file passed to editor has been created just now, it means Shift+F4 and this file only is sent to the editor. This key configures the maximum error: time length (in milliseconds) after which the file is no longer "created just now".
ClearSelection=1 If set to 1, the selection in the TC panel will be automatically cleared after launching the editor.
[Extensions] Section for binding file extensions to the editors.
ext1,ext2,...=Editor1 ext1, ext2 is a list of file extensions (<nil> for empty extension); the editor is specified in the [Program_Editor1] section.
[DefaultProgram] Parameters for the default editor (see description in the [Program_Editor1] section).
[Program_Editor1] Parameters for the editor Editor1.
FullPath=%ProgramFiles%\MyEditor\MyEditor.exe
Full path to the editor executable file. Environment variables are supported. (Please, keep in mind that variables' values may be different for 32- and 64-bit applications.)
CommandLineArgs= Additional command line arguments passed to the editor.
MDI=1 1 for multi-document editors; 0 for single-document editors.

Restrictions of the Program

  1. In the thumbnails mode only the focused file is opened (TC restriction).
  2. Paths %TEMP%\_tc and %TEMP%\_tc_ are special, only the focused file is opened from them (temporary solution, may be improved in the future).
  3. Virtual folders are not supported (may be improved in the future).
  4. In archives, FS plugins, FTP/LPT/USB connections only the focused file is opened (TC restriction).
  5. If selected files are assigned to different editors, they will all be opened by the same editor, the one that is assigned to the file under cursor, or (if this file is not selected) to the first selected file (may be improved in the future).

FAQ (Frequently Asked Questions)

Q: Why another multi-editor? There are already ChoiceEditor, OFSTC, F4Menu.
A: I just wanted to have such a program for myself, so that I did not depend on the authors of these programs and could myself fix bugs and implement improvements for my own needs. The functionality of TCER will never reach one of the mentioned programs, this is not my goal. The emphasis is on the minimal essential functionality, maximum compactness and performance. If anybody finds this program useful I'll be glad, otherwise there are other solutions to choose from. More is always better than less.
Q: I don't want to edit INI file manually. Why there is no visual configurator?
A: Because of the same minimalistic approach. It is possible that such a configurator will be written and included into the package, but this task has low priority for me. Besides, even in this case it will be a separate utility not integrated into the main executable.
Q: How can I assign several editors for single extension and select one of them on demand?
A: This function is not implemented and not planned.

Version history

Version 1.4.2.0 (10.01.2022):

  1. Fixed: Calling editor from the Sychronize Directories dialog did not work.

Version 1.4.1.0 (25.01.2018):

  1. Fixed: F4 from the Find Files dialog worked only with the standalone dialog.

Version 1.4.0.0 (9.12.2016):

  1. Added support for multiple extensions in one line.
  2. Added support for starting by F4 from the Find Files dialog.
  3. Support all values of the GetTextMode parameter in wincmd.ini.
  4. Fixed: Paths to files in disk root looked like c:\\file.ext (some applications fail to open such paths).

Version 1.3.0.0 (8.10.2011):

  1. Added support for TC x64.
  2. Protected from security issue (loading DLLs from incorrect path).
  3. Fixed: Newly created files (created by Shift+F4) were not detected on FAT/exFAT volumes.

Version 1.2.0.0 (30.01.2011):

  1. Fixed: Message boxes did not display in some cases.
  2. Fixed: Crash when opening more than 32 files.
  3. Fixed: Potential hang after program termination.

Version 1.1.0.0 (2.11.2010):

  1. Added separate version without SSE optimizations (for old processors).
  2. Significantly reduced EXE file size.
  3. Fixed: Full view mode was supported only when file sizes did not contain units.
  4. Fixed: When opening packed file in an MDI editor, TCER does not wait anymore for the process to terminate (reason: one can open within the same editor another file and close the first file, and such closing would not be detected in TC).
  5. Fixed: The program only started on WinXP SP2 and higher.
  6. Fixed minor typos.

Version 1.0.0.0 (16.10.2010):

  1. First public release.