Home page of Eric Pement

Home > tde.htm


TDE programmer's editor

TDE is a public domain text editor for writers and programmers, written in C and known to work in DOS, Windows, and Unix environments. I have customized it a bit to emulate the WordStar keybindings.

Download TDE here

There are over 1,900 different editors to choose from, so why should anyone consider regularly using TDE for writing code or everyday use?

Well, if personal recommendation is anything, let me start with that.

Why I like TDE

I have been using computers on a daily basis for over 30 years—for writing and editing at Cornerstone magazine, for many years in school, and for a professional career as a computer programmer and engineer. I've use and experimented with a *lot* of different editors, and I really like TDE. I like the fact that I can use the same editor on a Windows netbook, or in a 64-bit Cygwin environment, or on a Linux operating system, and have the same familiar keybindings.

I like the fact that it's free: I can instantly install it without paying money. You don't need to compile it, it runs "out of the box."

TDE editing 2 files

TDE editing 2 files, with the View menu displayed

I like the fact that the source code is bona-fide "public domain," so there are no licensing restrictions on using it, modifying it, or passing it on to others. If you wonder what it does, you can examine the source code to see exactly what is going on inside. (It helps to know C, but you can make several things out just by looking.)

I like that fact that TDE doesn't try to connect to the Internet at any time to check for licensing restrictions, program updates, or to transmit data about your usage or personal profile, as some programs do these days.

I like the fact that the source code is clean enough that even if you know very little about compiling source code, it will compile and run successfully on DOS, Windows, Cygwin, or Linux.

I like the fact that the entire keyboard can be remapped, so if you want to change what a control key or key combination does, you can do it by editing a regular config file. It's not necessary to muck about with the source code. Just tweak the TDE config file.

You may wonder why I care about keyboard "remapping."

If you do much writing, it's vital to develop "finger memory" for common editing actions (delete, move, copy, find, etc.), just as a musician develops finger memory for playing an instrument. Among text editors, there are a few classic keymaps (vi and Emacs are the two best examples) where you become a "power user" by deeply memorizing and using these key combinations. The object is to not have to think about which keys to press to move 3 sentences up; it comes automatically, instantly, naturally.

TDE comes with its own keymap, but I have changed it to adopt the familiar WordStar keymap. Science fiction writer Robert Sawyer explains why he believes the WordStar interface is superior for touch typists. (A "touch typist" is one who knows all the letters of the keyboard by touch, not by looking at it.) You may never, ever use WordStar, but many people find the WordStar keyboard layout to be immensely helpful.

I like the fact that TDE is a "console mode" editor; i.e., it lives and works at the local console (like a DOS window or like vi in Unix), rather that run as an external GUI or Windows application (like Notepad or UltraEdit). If you really want your editor to be a separate GUI application, then TDE is not for you. Try a commercial GUI editor like UltraEdit or EmEditor or a free GUI editor like Notepad++ or PSPad.

I like the fact that TDE offers macros: ways to automate certain commands, which can then be assigned to a custom key.

I like certain features that TDE has that other editors lack:

  • a drawing mode, using IBM-OEM line drawing characters
  • a movable, resizable block to measure the width of character strings
  • the ability to split windows
  • code comparison in 2 windows, with synchronized movement on scroll up/dn
  • syntax highlighting, with the ability to define new code types
  • the ability to add your own help menus
  • the ability to find all lines that were changed but not yet saved to disk

I like the fact that the man who now maintains TDE, Jason Hood, is a seasoned professional who is approachable and responsive to requests.

Download TDE here

Mirrored here on pement.org

Most Windows users will want the precompiled binaries ("tde51vb.zip"). When the archive is unpacked, three different executable versions will be available. Pick one of them, rename it to tde.exe and put it somewhere on the PATH.

  • tder.exe - for 16-bit, plain DOS systems without Windows (80286 or lower)
  • tdep.exe - for 32-bit, plain DOS systems without Windows (80386 or higher)
  • tdew.exe - for 32-bit Windows systems (80386 or higher processors)

I advise creating a new directory exclusively for your own utilities and put it there. (Some common directory names are c:\bin, c:\util, c:\utils\, c:\pgm, etc.) Do not try to put it under "C:\Program Files", because that directory name is special in Windows and you may not have write permission to the files inside it. Instead, create a new directory and add it to the PATH.

Things I wrote for TDE

I am very gratified to know that most of what I wrote for TDE is now part of the main distribution!

  • CUA.CFG is a configuration file I wrote in 2005 to alter the default layout of the menubar (the part of the program that controls menu items like File, Edit, View, Tools, etc.) into a layout similar to most text editors, to reduce the learning curve. The letters CUA stand for "common user architecture." The CUA.CFG file is now part of the main distribution for TDE binaries.
  • WORDSTAR.CFG is a config file I wrote to alter the key bindings of TDE so that it emulates the key bindings of WordStar 4.0. This config file is now included in the main distribution for TDE binaries. However, to use this file properly, it should be "folded" or inserted into the main TDE.CFG file which manages the rest of the keyboard definitions.
  • WORDSTAR.TXT is a custom help menu that is available to the user when the WordStar key bindings (above) are installed. This help menu is included in the main distribution for TDE binaries. But if you want to see it now, here is the menu: wordstar.txt
  • tde.btm
    This batch file is essentially a "wrapper" or "alias" for TDE. It requires Take Command. I work from a command shell, and when I invoke TDE, first the batch file checks the current screen width, because TDE will crash if the screen is too wide. If you don't like this, you can either recompile TDE to handle wider screens (I did this and it's probably the best option) or you can write a simple batch file to test the screen size before running TDE (I did this before I thought about recompiling TDE). The batch file starts with this test of screen width.

    Next, if TDE was called with filename parameters, the batch file checks the filetype. If the filetype is ".dat", I want TDE to act one way; if the filetype is ".txv", I want TDE to act another way, and if the filetype is anything else, I want TDE's default behavior. So, this little gem takes care of all that for me. Again, it requires "Take Command" to be loaded.

  • tde.cfg
    This is a sample of the config file that I currently use for TDE. Something similar is in the ZIP file, but I thought you might like to see how this one is used. Its real name was changed from "tde.cfg" to "tde_cfg.txt" so it will display on the web site. You will have to change its name back to use it.

Recompiling TDE

I have successfully recompiled TDE for Windows under these two environments:

These pages created with GNU Emacs, xhtmlpp, Take Command, and Altap Salamander. Icons courtesy of Qbullets
Last modified: 2015-01-17