home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Best Objectech Shareware Selections
/
UNTITLED.iso
/
boss
/
word
/
text
/
019
/
keys.jed
< prev
next >
Wrap
Text File
|
1993-01-19
|
6KB
|
164 lines
Setting Keys for Jed and Default keybindings.
Jed has an embedded language interpreter know as S-Lang. This makes JED
customizable. See some of the *.sl files for examples of how this works.
For details, read the file slang.txt. In particular, see the emacs.sl file
for emacs key bindings.
Setting keys:
The syntax is:
"function" "key" setkey
For example, to set the control X up_arrow on a VT100 to go to the top
of the buffer, do:
"bob" "^X^[[A" setkey
Here, the command to get executed is `bob' which is ``beginning of
buffer''. Not that the `^' character stands for `control' and that the
up arrow on a vt100 sends out the sequence of characters control-[,[,A.
Note that `^[' is also ESCAPE on most terminals.
Since I doubt that most people know what characters the cursor keys send
out on a vt100, I have listed them below:
"^[[A" up
"^[[B" down
"^[[C" right
"^[[D" left
For the IBMPC, see the file doskeys.c for the PC codes.
Here are the possible built in functions and a description of what they do.
It is also possible to bind keys to your own functions. Undocumented
functions are considered self explanatory.
key function ; description
----- exiting/spawning ----
^KE "exit_jed" ; exit editor gracefully
^Z "sys_spawn_cmd" ;
---- buffer/file Commands -----
^K^I "insert_file" ;
^X^B "list_buffers" ;
^XK "kill_buffer" ;
^XB "switch_to_buffer" ;
^KG "find_file" ;
^K^W "write_buffer"
-----Moving Cursor/Point------
^[[D "previous_char_cmd" ;
^[[A "previous_line_cmd" ;
^[[B "next_line_cmd" ;
^[[C "next_char_cmd" ;
^D "page_down" ;
^U "page_up" ;
^B "bol" ; goto beginning of line
"eol" ; goto end of line
^E "eol_cmd" ; goto end of line removing excess whitespace
^K^[[B "eob" ; goto end of buffer
^K^[[A "bob" ; goto beginning of buffer
^KC "goto_column" ;
^KL "goto_line" ;
^X^X "exchange" ; if mark is set, exchange point with mark
^\ "goto_match" ; find matching `([{` if on `}])'
^KM "mark_spot" ; mark this place for future reference
^K^M "pop_spot" ; return to spot
---- Window Commands ----
^R "redraw" ; clear screen and repaint it
^K^[[D "scroll_right" ; scrolls the window right
^K^[[C "scroll_left" ; scrolls window left
^W2 "split_window" ;
^WO "other_window" ; move to next window
^W1 "one_window" ; make current window the only window on screen
^X^ "enlarge_window" ;
---Basic Editing Commands (Cut/Paste) ----
a-z "self_insert_cmd" ; insert character into buffer. Most keys do this
^V "delete_char_cmd" ;
"backward_delete_char" ;
DEL "backward_delete_char_untabify" ;Note that DEL is "^?"
^L "kill_line_cmd" ; kill to end of line unless at beginning
in which case kill whole line.
"kill_eol_cmd" ; kill to end of line putting text in paste buffer
^K^L "double_line" ; make two copies of current line.
^X^T "transpose_lines" ;
^K^B "set_mark_cmd" ; set mark to mark beginning of region. Location
of Point (Cursor) marks end. No highlighting.
^K^V "kill_region" ; delete region and put it in paste buffer
^KK "copy_region" ; put a copy of region in paste buffer
^K^P "yank" ; paste paste buffer to current spot
^[\ "trim_whitespace" ; remove all white space around point.
---- search/replace ---------
^K^R "replace" ; runs the command query replace
^FF "search_forward" ;
^FB "search_backward" ;
---- Special Text Processing Commands ----
{ "brace_bra_cmd" ; smart insertion of `{`
} "brace_ket_cmd" ;
^M "newline_and_indent" ; ^M is the return key
"newline" ;
TAB "indent_line" ; don't like it: set it to self-insert
^J "delete_word" ;
^[L "downcase_word" ;
^[U "upcase_word" ;
^[C "capitalize_word" ;
', " "text_smart_quote" ; if key is a sigle quote of double quote make it
insert as in: This `Q' is pronounced ``Queue''.
^[S "center_line" ;
^[N "narrow_paragraph" ; take current line's indentation and apply it
to current paragraph.
^[Q "format_paragraph" ; wraps paragraph
-----Miscellaneous-----
^XN "narrow" ; restrict editing commands to current region
^XW "widen" ; undo narrow
^K( "begin_macro" ; start keyboard macro
^K) "end_macro" ; end keyboard macro
^KX "execute_macro" ; play last keyboard macro
^KD "evaluate_cmd" ;
` "quoted_insert" ; inserts next character with no interpretation
"beep" ;
^G "kbd_quit"
User Variables:
User Variables are set like any other variable. They are:
TAB: The default is 8. If this is set to 0, then tabs are
not used.
WRAP: Wrap column. This is used by the text formatting commands to
determine where a paragraph gets wrapped. The default is 78.
C_INDENT: Amount if space to indent past an opening brace. The
default is 3.
C_BRACE: Amount of space a brace is indented. Default is 2.
LAST_CHAR: Last character entered in from the keyboard.
examples:
4 =TAB ;; 4 column tabs
0 =C_BRACE ;; do not indent braces
72 =WRAP ;; set wrap column to 72