home *** CD-ROM | disk | FTP | other *** search
/ Best Objectech Shareware Selections / UNTITLED.iso / boss / word / text / 019 / keys.jed < prev    next >
Text File  |  1993-01-19  |  6KB  |  164 lines

  1. Setting Keys for Jed and Default keybindings.
  2.  
  3.    Jed has an embedded language interpreter know as S-Lang.  This makes JED
  4. customizable.  See some of the *.sl files for examples of how this works.
  5. For details, read the file slang.txt. In particular, see the emacs.sl file
  6. for emacs key bindings.
  7.  
  8.  
  9. Setting keys:
  10.  
  11.     The syntax is:
  12.     
  13.         "function" "key" setkey
  14.     
  15.     For example, to set the control X up_arrow on a VT100 to go to the top
  16.     of the buffer, do:
  17.     
  18.         "bob"  "^X^[[A"   setkey
  19.     
  20.     Here, the command to get executed is `bob' which is ``beginning of
  21.     buffer''.  Not that the `^' character stands for `control' and that the
  22.     up arrow on a vt100 sends out the sequence of characters control-[,[,A.
  23.     Note that `^[' is also ESCAPE on most terminals.
  24.     
  25.     Since I doubt that most people know what characters the cursor keys send
  26.     out on a vt100, I have listed them below:
  27.  
  28.      "^[[A"   up
  29.      "^[[B"   down
  30.      "^[[C"   right
  31.      "^[[D"   left
  32.  
  33.      For the IBMPC, see the file doskeys.c for the PC codes.
  34.  
  35. Here are the possible built in functions and a description of what they do.
  36. It is also possible to bind keys to your own functions. Undocumented
  37. functions are considered self explanatory.
  38.  
  39. key   function             ; description
  40.  
  41. ----- exiting/spawning ----
  42.  
  43. ^KE    "exit_jed"         ; exit editor gracefully
  44. ^Z    "sys_spawn_cmd"         ;
  45.  
  46.  
  47. ---- buffer/file Commands -----
  48.  
  49. ^K^I    "insert_file"         ;
  50. ^X^B    "list_buffers"         ;
  51. ^XK    "kill_buffer"         ; 
  52. ^XB    "switch_to_buffer"   ;
  53. ^KG    "find_file"         ;
  54. ^K^W    "write_buffer"
  55.  
  56.  
  57.        -----Moving Cursor/Point------
  58.  
  59.  
  60. ^[[D    "previous_char_cmd"  ; 
  61. ^[[A    "previous_line_cmd"  ;
  62. ^[[B    "next_line_cmd"         ;
  63. ^[[C    "next_char_cmd"         ;
  64. ^D    "page_down"         ; 
  65. ^U    "page_up"         ;
  66. ^B    "bol"             ; goto beginning of line
  67.     "eol"             ; goto end of line
  68. ^E    "eol_cmd"         ; goto end of line removing excess whitespace
  69. ^K^[[B    "eob"             ; goto end of buffer
  70. ^K^[[A    "bob"             ; goto beginning of buffer
  71. ^KC    "goto_column"         ;
  72. ^KL    "goto_line"         ;
  73. ^X^X    "exchange"           ; if mark is set, exchange point with mark
  74. ^\    "goto_match"         ; find matching `([{` if on `}])'
  75. ^KM    "mark_spot"         ; mark this place for future reference
  76. ^K^M    "pop_spot"         ; return to spot
  77.  
  78. ---- Window Commands ----
  79.  
  80. ^R    "redraw"         ; clear screen and repaint it
  81. ^K^[[D    "scroll_right"         ; scrolls the window right                        
  82. ^K^[[C    "scroll_left"         ; scrolls window left
  83. ^W2    "split_window"         ;                                                 
  84. ^WO    "other_window"         ; move to next window                             
  85. ^W1    "one_window"         ; make current window the only window on screen
  86. ^X^     "enlarge_window"     ;
  87.  
  88.  
  89. ---Basic Editing Commands (Cut/Paste) ----
  90.  
  91. a-z    "self_insert_cmd"    ; insert character into buffer.  Most keys do this
  92. ^V    "delete_char_cmd"    ;
  93.     "backward_delete_char" ;
  94. DEL    "backward_delete_char_untabify"  ;Note that DEL is "^?"
  95. ^L    "kill_line_cmd"      ; kill to end of line unless at beginning
  96.                    in which case kill whole line.
  97.     "kill_eol_cmd"         ; kill to end of line putting text in paste buffer
  98. ^K^L    "double_line"         ; make two copies of current line.
  99. ^X^T    "transpose_lines"    ;
  100. ^K^B    "set_mark_cmd"         ; set mark to mark beginning of region.  Location
  101.                    of Point (Cursor) marks end. No highlighting.
  102. ^K^V    "kill_region"         ; delete region and put it in paste buffer
  103. ^KK    "copy_region"         ; put a copy of region in paste buffer
  104. ^K^P    "yank"             ; paste paste buffer to current spot
  105. ^[\    "trim_whitespace"    ; remove all white space around point.
  106.  
  107. ---- search/replace ---------
  108.  
  109. ^K^R    "replace"         ; runs the command query replace
  110. ^FF    "search_forward"     ;
  111. ^FB    "search_backward"    ;
  112.  
  113. ---- Special Text Processing Commands ----
  114. {    "brace_bra_cmd"         ; smart insertion of `{`
  115. }    "brace_ket_cmd"         ;
  116. ^M    "newline_and_indent" ;  ^M is the return key
  117.     "newline"         ;
  118. TAB    "indent_line"         ; don't like it: set it to self-insert
  119. ^J    "delete_word"         ;
  120. ^[L    "downcase_word"         ;
  121. ^[U    "upcase_word"         ;
  122. ^[C    "capitalize_word"    ;
  123. ', "    "text_smart_quote"   ; if key is a sigle quote of double quote make it
  124.                 insert as in: This `Q' is pronounced ``Queue''.
  125. ^[S    "center_line"         ;
  126. ^[N    "narrow_paragraph"   ; take current line's indentation and apply it
  127.                                to current paragraph.
  128. ^[Q    "format_paragraph"   ; wraps paragraph
  129.  
  130. -----Miscellaneous-----
  131.  
  132. ^XN    "narrow"         ; restrict editing commands to current region
  133. ^XW    "widen"             ; undo narrow
  134. ^K(    "begin_macro"         ; start keyboard macro
  135. ^K)    "end_macro"             ; end keyboard macro
  136. ^KX    "execute_macro"         ; play last keyboard macro
  137. ^KD    "evaluate_cmd"         ; 
  138. `    "quoted_insert"         ; inserts next character with no interpretation
  139.     "beep"             ; 
  140. ^G    "kbd_quit"
  141.       
  142. User Variables:
  143.  
  144.    User Variables are set like any other variable.  They are:
  145.    
  146.        TAB:   The default is 8.  If this is set to 0, then tabs are 
  147.               not used.  
  148.     
  149.        WRAP: Wrap column.  This is used by the text formatting commands to
  150.              determine where a paragraph gets wrapped.  The default is 78.
  151.          
  152.        C_INDENT: Amount if space to indent past an opening brace.  The
  153.              default is 3.
  154.          
  155.        C_BRACE:  Amount of space a brace is indented.  Default is 2.
  156.        
  157.        LAST_CHAR:  Last character entered in from the keyboard.
  158.        
  159.        examples:   
  160.            4 =TAB      ;; 4 column tabs
  161.        0 =C_BRACE  ;; do not indent braces
  162.        72 =WRAP    ;; set wrap column to 72
  163.  
  164.