Recent Changes - Search:

Ted /



TED Completion

Command completion gives hints for known matches of input being typed in by the user. Known matches, if any, appear in the status bar at the bottom of the screen. If there is a unique match the matching input trailing part of the match is grayed out, and the leading part is colored light blue. Typing the <Tab> key at this point will accept and display the match in green. In the case of commands, a proc prototype/extern may appear in the status bar, giving hints on expected arguments. Command completion can be enabled in Ted via the Preferences/Development/Auto-Completion menu item.

Selection Popup

To popup the Keyword Selection dialog list, simply use <Control-space> in a partial match or after a space char (see Screenshot). Each item in the popup list has a number/letter prefix to support shortcut selection/insertion by typing a single char. As with most transient dialogs in Ted, hitting <Escape> closes the window. Typing slash or clicking <Control-1> over a command completion will bring up its Man-page (for a command) or Editor (for a proc). Also, the usual navigation keys work such as: <Control-n> or <Control-d>.

Command completion in TED is provided for two distinct things: commands and for parameters. With commands, the first word or command may be completed with any well-known word. A word is well-known word if defined as a keyword in the current syntax, or is a key found in the CTags sidebar (once opened). This provides TED with a simple way to match commands for languages other than Tcl.

For parameters, completion is available for Tcl commands defining an Extern (Ted ships with extern definitions for all of Tcl and Tk). Completion matching is normally limited to items matching the prefix. However to see all matches, one can type <Control-space>.

Custom Dialogs

Command arguments may be described via an extern definition, and thus may have types. When a type is topts, specific sub-types (such as tkcolor and tkfont) may have associated dialogs which may be invoked with <Control-Space> on a line ending with a space. For example:

  text new .c -bg <Control-Space>

See the dialog screenshot.


There are several known limitations with the completion implementation. One current limitation with argument completion is that it works only for Tcl parameters, and where no preceding parameter contains a braced command sub-call. To work around this instance, insert arguments at the first parameter position.

Edit - History - Print - Recent Changes - Search
Page last modified on June 06, 2009, at 03:49 PM