Recent Changes - Search:

Ted /




Ted's editing keys are a modified superset of the standard Text widget bindings. That is, editing actions such as movement typically use the control key. The first section contains a quick reference of the main control keys. The subsequent sections group the keys by function.

Quick Reference

Find below the main editing actions, listed alphabetically along with mnemonic descriptions. In all of the following, presume that <Control> is being held:

 a        begin of line
 b        Backward char
 c        Copy selection
 d        Down page
 e        End of line.
 f         Forward char.
 g        Goto mark
 h        Delete char
 j         Join lines
 k        Kill to lineend
 l         Load from buffer
 m       Mark place
 n        Next line
 o        Open line
 p        Previous line
 q        previous word
 r         Replace dialog.
 s        Search/find dialog
 t        Tag block
 u        Up page
 v        Paste
 w       Next word
 x        Cut
 y        Yank to buffer
 z        Zap/undo change

 ;        reselect or paste to last-insert
 '        set anchor
 "        swap position with anchor
 .        next paragraph
 ,        previous paragraph
 /        repeat last find
 \        filter
 /        find-next
 ?       find reverse-direction
 ~       switch case
 -        previous edit
 _       next edit
 *        select-all

 [        brace-match
 ]        fold/unfold text.
 {        brace match plus select
 }        complete braces from linestart to insert.
 (        select current proc
 )        do brace/quote validation
 +       select proc and do brace/quote validation
 =       reformat code

 space  completion dialog
 Insert   auto-selection mode

Movement Keys

 Control-f         forward/next char.
 Control-b        back/previous char.
 Control-w       next word                  (same as Control-right).
 Control-q        previous word              (same as Control-left).
 Control-n        next line.
 Control-p        previous line.
 Control-.         next paragraph             (same as Control-down).
 Control-,         previous paragraph         (same as Control-up).
 Control-d        next page
 Control-u        previous page

 Control-a        start of line.
 Control-e        end of line.
 Control-home start of file.
 Control-end    end of file.

 Control-s         the find dialog.
 Control-r         the search and replace dialog.
 Control-/         repeat last find.
 Control-?        repeat find, reversing direction of search.

 Control-minus          return to a previous edited lines.
 Control-underscore return to a next edited lines.
 Control-Return         move to start of next line.

Modify Keys

 Control-h         delete char or selection   (same as Backspace).
 Control-H         delete next char or selection   (same as Delete).
 Control-k         delete from the insertion cursor to the end of its line
 Control-o         opens new line: inserts a newline char at cursor.
 Control-j          join lines (for selected or current) by deleting newlines at eol.
 Control-z         undo previous change.
 Control-Z         redo previous undo.
 Control-=         reformat selected lines or current line.
 Control-\          filter dialog for selection or current line.
 Control-~         switch case of char and advance to ahead one.
 Control-z         undo last change.
 Control-Z        redo last undo.
 Control-Alt-z   redo last undo (alternate key for redo)
 Control-Alt-A   insert ascii control char from next typed char.
 Alt-Shift->        indent selected lines or current line.
 Alt-Shift-<        unindent selected lines or current line.

Selection Keys

 Control-c        copy selected text
 Control-x        cut selected text
 Control-v        paste last copy/cut.
 Control-'         set anchor.
 Control-"         swap position with anchor.
 Control-;         reselect or copy selection, move insert/view to last-insert, then paste.
 Control-*         toggle selection of whole file.
 Control-I         select-mode input (same as Control-Insert)
 Control-K        cut the remainder of line to the cut buffer.
 Control-space completion dialog.
 Control-Shift-space    extend selection from anchor to current insert.
 Control-Insert  toggle auto-selecting of all typed input or movement.
 Control-Shift-I same as above.

Buffer Mark Keys

 Control-m          mark position as named using next char typed.
 Control-t           tag selection as a block using next char typed.
 Control-g          goto mark/tag given by the next char typed.
 Control-C          copy selection to buffer named with next char typed.
 Control-X          cut selection to buffer named with next char typed.
 Control-V          insert contents from buffer given by with next char typed.
 Control-y           copy to named buffer; like Control-Shift-C plus deselects.
 Control-l            insert named buffer; like Control-Shift-V plus deselects.

Menu Accelerator

 Alt-s           Save file.
 Alt-o           Open new file.
 Alt-n           Open file in new window.
 Alt-r            Reload file.
 Alt-F4         Close window.

Special Keys

 Control-[         brace match
 Control-]         hide to matching endbrace/selected region or unfold current line.
 Control-{         brace match plus select
 Control-}         complete braces from linestart to insert.
 Control-(         select current proc
 Control-)         do brace/quote validation
 Control-+        select proc and do brace/quote validation

Function Keys

 F3              goto previous warning/error.
 F4              goto next warning/error.
 F5              Single-step next instruction.
 F6              Step over functions.
 F7              Finish execution of current function.
 F8              Continue execution until break or end.
 F9              Make then reexecute to current line.
 F10            goto menu.
 Shift-F2        Run Make to rebuild target.
 Shift-F3        goto previous error.
 Shift-F4        goto next error.
 Shift-F10      build/rebuild Tcl interface file..

Shifted Keys and Selection

All move commands have shift'ed versions to select data while moving. ie. holding down the shift key and using a move key will extend the selection. Note while the anchor is maintained for keyboard movements, a mouse will click reset it.

Control-; serves a dual purpose. If not text is currently not selected, it reselects the previous selection (ie. anchor to insert). Otherwise, it pastes the selection to the last insert position. This is roughly equivalent to: Control-c Control-' Control-v, or using Control-B1 after a selection.

Named Buffers and Position Marks

Marks are simply positions within a file named from 'a'-'z'. Tags are similar to mark, except they also have end positions, ie. tags delimit blocks. Lastly, there are buffers which are used for managing cut, copied and pasted data. In the following commands, the cursor changes to gumby when a buffer name is required from user. If there is no selection when "Yank" (Control-y) is used, you will be prompted for a mark name position to yank from.

A buffer name "/" can be used with "Yank" to write to a file or with "Load" (Control-l) to read a file.

To display all buffers, use Control-l then release and repress Control.

Text Binding Differences

Copy, Cut and Paste all work differently than the standard Text widget. In the standard Text widget when there is no selection, Cut and Copy do nothing. The new behavior is that if nothing is selected, the current line gets Cut or Copied.

When there is a selection, Copy gives visual feedback by automatically deselecting text. Paste will delete any previously selected text before doing insertion. That means paste is now actually replacement. Also the inserted text is left selected until the Control key is released to allow further Control operations to occur. (If the original paste behavior is required, you may use <Control-Alt-v>.)

The following sample session is the command-line equivalent of the search and replace dialog.

  <Control-s>      # open find dialog
  FOO              # enter some text and hit enter.
  <Control-Insert> # change to auto-selected input mode
  BAR              # enter replacement text, auto-highlighted
  <Control>        # press and hold Control key
  c                # copy to buffer, which also exits select-input mode
  /                # repeat last find
  v                # paste buffer
  /                # repeat last find
  v                # paste buffer
  ...              # release control key when done.

Mouse Functions

Basic mouse functionality works as follows:

  - Clicking mouse button 1 <B1> sets the insertion point.  
  - <Shift-B1> sets the insertion point and extends the end of the selection.  
  - <Control-B1> changes the insertion point without affecting the current selection.
  - <Double-B1> highlights the current word.
  - <Control-Double-B1> toggles a breakpoint.
Edit - History - Print - Recent Changes - Search
Page last modified on February 16, 2008, at 09:45 AM