Recent Changes - Search:

Ted /




How do I copy the current line?

Just use <Control-c> when nothing is selected. Also moves to start of line.

How do I delete the current line?

Just use <Control-x> when nothing is selected. Also moves to start of line.

How do I reselect something after deselection/paste?

Use <Control-;>. When nothing is selected, it reselects. But see next Q.

What's the easiest way to copy+paste into current insert when using the mouse?

After inserting data, use mouse to highlight some text, then hit <Control-;>. This resolves the problem of selection implicitly moving insert. But for it to work, you must have inserted something in the target area just prior. This is easily done by using <space><BackSpace> prior to selection. Also see the previous Q.

How do I get back to previous edit locations after moving?

Two choices. First is <Control-'> which toggles to the last insert position. The second more general method is to use <Control-->/<Control-_> to go backward and forward through the last modified areas. Last modified areas are windows of about +-10 lines around the last cut, copy, paste or modify.

When I goto a tagged block how can it be selected?

When using goto with a tag-block, the other end of the block is automatically setup as the anchor. Thus Control-; used immediately after goto will select it.

How do I re-indent/re-highlight code?

Use <Control-=> either on a selection or current line. Note that this formating is limited to indentation and syntax highlighting only. Note: this formatting also occurs automatically when you hit return.

How do I select the current proc? The whole file?

Use <Control-(> for the current proc, or <Control-*> for the whole file.

Can I validate braces and quotes match in code before running it?

Yes. Use <Control-)> for selected, or <Control-+> for current proc.

How do I zap the autoindention for a line after hitting enter or pasting?

Hit <Control-z>. This will undo just the auto-indent. If you want to just unindent by say 4 spaces after hitting Return, you'll have to hit backspace 4 times.

Can I execute arbitrary Tcl or exec commands on a selection?

Use <Control-\> to invoke the filter dialog. This offers numerous standard filters, as well as the option to run arbitrary Tcl commands and external OS commands.

How do I insert a real tab?

Use <Control-Alt-a><i> or use menu Edit/Other/Insert-Ascii <i>.

Can I select multiple lines, mouselessly?

Press and hold <Control> then type "b'nnnnn;". Note that <Control-'> sets the anchor.

How do I deselect text without moving, like after a find for example?

Use <Control-'>. Note: this also resets the anchor.

How is Copy & Paste different than standard Tk?

Copy and Paste work differently than the standard Text widget. When copying, text will deselect. Similarly during a paste, any previously selected text is deleted during insertion. This means that paste is actually "replace". Also the pasted text remains selected until the Control key is released, which allows further <Control> operations to occur. If the old unselected paste is required, use <Control-Alt-v>.

Reaching the Control key is awkward. What can I do?

Under Linux remap the Caps-Lock key either in /etc/Xorg.conf with

       Section "InputDevice"
         Option  "XkbOptions"    "ctrl:nocaps"

    or add the following to your .profile

        xmodmap -e 'remove Lock = Caps_Lock'
        xmodmap -e 'keysym Caps_Lock = Control_L'
        xmodmap -e 'add Control = Control_L'

    Under windows, check google for the appropriate regedit.

Why doesn't TED use modes, like say VI?

A - A complex question. While moded editors can be powerful, they present challenges for casual users and novices. They are also clumsy during revisions, when there is a constant need to enter and leave input mode. Finally, it is often cited that moded editors are faster than mousy ones because both hands can stay on the keyboard. However, with the advent of the laptop touchpad, this has changed: One thumb can push B1 and the other stroke the pad to move the mouse, all without taking fingers from the home position.

Buffers and Marks

How do I yank/copy/cut from to mark current position to a buffer?

If nothing is selected when you use <Control-y> (etc), you will be prompted first for the mark name char, then for a destination buffer name.

How do I read a file into the editor?

Use "<Control-l></>". The "/" buffer represents the filesystem.

How do I write out selected text to a file?

Use "<Control-y></>". The "/" buffer represents the filesystem.

Are named buffers shared between views/windows?

No. Only the default cut/paste buffer or selection is shared. That said, if you view, cut, or copy to a named buffer the default selection is set. So you should be able to immediately paste into another window.

How do I display all buffers?

To bring up the buffer display dialog use <Control-l>+<Control> , that is, release and repress the control key right after the <Control-l>. You may also use the menu entry Edit/Buffer/Show-Buffers. To show/edit named buffers type <Control-y>+<Alt> or any non-valid key.

How do I display all marks? All tags?

To display all named marks/tags on the status line, type <Control-g>+<Alt>. To display visually, use the menu entry Edit/Buffer/Show-Marks after which clicking in the highlighted area reports the name in the status line. To cycle to next mark/tag use <Control-g>+<Control>, that is, release and repress the control key right after the <Control-g>.


How do I eliminate a warning from a proc/file.

Just use a "#NOWARN:" comment before the offending statement inside a proc. Optionally a space+number may be appended to skip multiple warnings. Irregardless, warnings are re-enabled once a proc is finished compiling. If used outside a proc, warnings will be disabled for the entire file sourcing.

Why do I get 'implicit proc call', even when proc is defined.

A proc must be compiled before it is called from another proc. If that is not possible, an extern statement should be used.

Why do I get an uncompiled switch statement?

Switch requires the -- option to be compilable. Also the patterns should not have quotes around them. Use braces instead.

What can prevent a switch statements from compiling.

Not using -- or using quotes instead of braces in string arms/patterns.

How do I represent single open or close braces in a braced string?

Use hex eg.

set x "\{"
switch -- $x {
  \x7b { puts "Open" }
  \x7d { puts "Close" }
set else [subst -nocommands -novariables {\x7d else \x7b}]


What is TED? Why was it written? Is Ted a word processor.

TED is an editor which can also interface with debuggers such as gdb and Wize. It was created to simplify developing with Tcl and C. TED is an acronym for Tcl Editor and Debugger and it bears no relationship to the Motif-X application Ted which is an (RTF) word processor.

What is Wize?

Wize is a Tcl validator and debugger.

Edit - History - Print - Recent Changes - Search
Page last modified on June 04, 2009, at 08:16 AM