{{{ comments for this binding ; ; This is a binding combining the following possibilities ; * emacs mode like michael haardts bindings ; * sun-multitool handling (R-keys and ESC ..) ; This mode also includes the emacs cursor-motion-sequences ; * A standard-macro package to handle several editor-modes ; * tds/multitool FILE_FOLD_MACROS ; }}} {{{ I call these bindings MTool-Emacs (defbinding MTool-Emacs) }}} {{{ marktypes (defmark pascal ( ("< "< "<)(". ". ".)(": ": ":)("> "> ">))) }}} (defmodes mtool emacs) {{{ OCL-macros {{{F mt-fold.fun :::F mt-fold.fun }}} {{{F lookup.fun :::F lookup.fun }}} {{{F delspaces.fun :::F delspaces.fun }}} {{{F append -to-previous-line :::F append.fun }}} {{{F fillpara.fun :::F fillpara.fun }}} {{{F tab.fun :::F tab.fun }}} {{{F go-match.fun :::F go-match.fun }}} {{{F towers.fun !!!!attach to use!!!! :::F towers.fun }}} {{{F maze-mac.fun !!!!attach to use!!!! :::F maze-mac.fun }}} {{{F ff_uni.fun :::F ff_uni.fun }}} {{{F ff_tds.fun :::F ff_tds.fun }}} {{{ FILE_FOLD (deffun FILE_FOLD ( if or(counter>0 o-mode,test-language "t) ( O_FILE_FOLD_TDS_NO_RM ) else ( O_FILE_FOLD ) fi )) }}} {{{ startup {{{F startup.fun :::F startup.fun }}} {{{F standard.fun :::F standard.fun }}} }}} {{{ deffun kbd_ch (deffun kbd_ch ( if counter-0 kbd-no ( emacs set-counter kbd-no 1 ) else ( mtool set-counter kbd-no 0 ) fi )) }}} (automacro start-up) }}} {{{ bindings {{{ Alias for SUN-Keyboard (sunview and console) ; The following aliases describe the sunview-standard-keymapping for ; the Rxx-Keys and the Ins-Key. {{{ Rxx (alias R1 ($esc "[ "2 "0 "8 "z)) (alias R2 ($esc "[ "2 "0 "9 "z)) (alias R3 ($esc "[ "2 "1 "0 "z)) (alias R4 ($esc "[ "2 "1 "1 "z)) (alias R5 ($esc "[ "2 "1 "2 "z)) (alias R6 ($esc "[ "2 "1 "3 "z)) (alias R7 ($esc "[ "2 "1 "4 "z)) (alias R8 ($esc "[ "A)) ; using cursor-keys enabled! (alias R9 ($esc "[ "2 "1 "6 "z)) (alias R10 ($esc "[ "D)) ; using cursor-keys enabled! (alias R11 ($esc "[ "2 "1 "8 "z)) (alias R12 ($esc "[ "C)) ; using cursor-keys enabled! (alias R13 ($esc "[ "2 "2 "0 "z)) (alias R14 ($esc "[ "B)) ; using cursor-keys enabled! (alias R15 ($esc "[ "2 "2 "2 "z)) }}} (alias Ins ($esc "[ "2 "4 "7 "z)) }}} (keybind abort (C-\)) {{{ mtool (mode mtool {{{ folding (keybind O_AUTO_FOLD ($esc "a "f)) (keybind O_ATTACH_FILE ($esc "a "t)) (keybind O_CREATE_FOLD ($R15)) (keybind O_CREATE_FOLD ($esc "c "r)) (keybind O_FIRST_LINE_TO_FOLD_HEADER ($esc "f "h)) (keybind O_FOLD_INFO ($esc "f "?)) (keybind O_ENTER_FOLD ($R13 $R4)) (keybind O_ENTER_FOLD ($esc "e "n)) (keybind O_ENTER_FOLD (M-C-O)) (keybind O_EXIT_FOLD ($R13 $R6)) (keybind O_EXIT_FOLD ($esc "e "x)) (keybind O_EXIT_FOLD (M-C-C)) (keybind O_CLOSE_FOLD ($R6)) (keybind O_CLOSE_FOLD ($esc "c "l)) (keybind O_CLOSE_FOLD (C-C)) (keybind FILE_FOLD ($R13 $R11)) (keybind FILE_FOLD ($esc "f "f)) (keybind O_FILE_FOLD_UNIQUE ($esc "f "u)) (keybind O_OPEN_FOLD ($esc "o "p)) (keybind O_OPEN_FOLD ($R4)) (keybind O_OPEN_FOLD (C-O)) (keybind O_REMOVE_FOLD ($esc "r "e)) (keybind O_REMOVE_FOLD ($R13 $R15)) }}} {{{ moving around (keybind O_BOT_OF_FOLD ($R3)) (keybind O_BOT_OF_FOLD ($esc "b "O)) (keybind O_DOWN ($R14)) (keybind O_DOWN ($esc "d "n)) (keybind O_DOWN (C-N)) (keybind O_END_OF_LINE ($R9)) (keybind O_END_OF_LINE ($esc "e "l)) (keybind O_GOTO_LINE ($esc "g "o)) (keybind O_GOTO_LINE ($R13 "g)) (keybind O_LEFT ($esc "l "e)) (keybind O_LEFT ($R10)) (keybind O_LEFT (C-B)) (keybind O_PAGE_DOWN ($esc "p "d)) (keybind O_PAGE_DOWN ($R13 $R3)) (keybind O_PAGE_UP ($esc "p "u)) (keybind O_PAGE_UP ($R13 $R1)) (keybind O_RIGHT ($esc "r "i)) (keybind O_RIGHT ($R12)) (keybind O_RIGHT (C-F)) (keybind O_START_OF_LINE ($R7)) (keybind O_START_OF_LINE ($esc "s "l)) (keybind O_TOP_OF_FOLD ($esc "s "F)) (keybind O_TOP_OF_FOLD ($R1)) (keybind O_UP ($esc "u "p)) (keybind O_UP ($R8)) (keybind O_UP (C-P)) (keybind O_WORD_LEFT ($esc "l "w)) (keybind O_WORD_LEFT ($R13 $R10)) (keybind O_WORD_RIGHT ($esc "r "w)) (keybind O_WORD_RIGHT ($R13 $R12)) (keybind mtool-top ($esc "s "f)) (keybind mtool-top ($R13 $R8)) (keybind mtool-bot ($esc "b "o)) (keybind mtool-bot ($R13 $R14)) (keybind goto-matching-fence ($esc "])) }}} {{{ editing (keybind O_COPY ($R13 $R5)) (keybind O_COPY ($esc "c "o)) (keybind O_COPY_PICK ($R5)) (keybind O_COPY_PICK ($esc "c "p)) (keybind O_MOVE ($esc "m "o)) (keybind O_MOVE ($R13 $R2)) (keybind O_PICK ($esc "p "i)) (keybind O_PICK ($R2)) (keybind O_PUT_PICK ($esc "p "p)) (keybind O_PUT_PICK ($R11)) (keybind O_RETURN (C-M)) (keybind O_RETURN (C-J)) (keybind go_to_next_tab ($tab)) }}} {{{ macros (keybind O_DEFINE_FIX ($esc "d "f)) (keybind O_DEFINE_MACRO ($esc "d "m)) (keybind O_DEFINE_MACRO ($R13 "d "m)) (keybind O_EXECUTE_MACRO ($esc "c "m)) (keybind O_EXECUTE_MACRO ($R13 "m)) (keybind execute-macro-1 ($esc "m "1)) (keybind execute-macro-2 ($esc "m "2)) (keybind execute-macro-3 ($esc "m "3)) (keybind execute-macro-4 ($esc "m "4)) (keybind execute-macro-5 ($esc "m "5)) (keybind execute-macro-6 ($esc "m "6)) (keybind execute-macro-7 ($esc "m "7)) (keybind execute-macro-8 ($esc "m "8)) (keybind execute-macro-9 ($esc "m "9)) }}} {{{ deletes (keybind O_DELETE (C-H)) (keybind O_DEL_CHAR_RIGHT (C-?)) (keybind O_DEL_LINE ($R13 $R9)) (keybind O_DEL_LINE ($esc "d "l)) (keybind O_DEL_TO_EOL ($esc "d "e)) (keybind O_UNDEL_CHAR ($esc "u "c)) (keybind O_UNDEL_LINE ($esc "u "l)) (keybind delspaces ($esc C-?)) (keybind append-to-previous-line ($esc C-H)) }}} {{{ finds (keybind O_FIND ($esc "f "i)) (keybind O_FIND_REVERSE ($esc "f "r)) (keybind incremental-search ($esc "i "s)) (keybind incremental-search ($R13 "f)) (keybind query-replace-string ($esc "r "p)) (keybind query-replace-string ($R13 "r)) }}} {{{ specials (keybind O_HELP ($esc "h "e)) (keybind O_HELP ($R13 "h)) (keybind O_REFRESH ($esc $esc)) (keybind O_REFRESH ($R13 $R13)) (keybind O_QUOTE (C-Q)) (keybind describe-bindings ($R13 "?)) (keybind describe-bindings ($esc "h "b)) (keybind lookup ($esc "l "o)) (keybind kbd_ch ($esc "k "b)) }}} {{{ shells/filter (keybind O_FINISH ($esc "f "n)) (keybind O_SHELL ($esc "s "h)) (keybind O_QUIT ($esc "q "u)) (keybind O_QUIT ($R13 "q)) (keybind filter-buffer ($esc "f "b)) (keybind pipe-from-command ($esc "< "p)) (keybind pipe-to-command ($esc "> "p)) (keybind pipe-kbd-from-command ($esc "p "k)) (keybind shell-command ($esc "s "c)) (keybind suspend-origami (C-S)) }}} {{{ files (keybind O_INSERT_FILE ($esc "i "n)) (keybind O_INSERT_FILE ($R13 "i)) (keybind O_OPEN_NEW_FILE ($esc "o "f)) (keybind O_OPEN_NEW_FILE ($R13 "o)) (keybind O_SAVE_FILE ($esc "s "a)) (keybind O_SAVE_FILE ($R13 "s)) (keybind next-file ($esc "n "f)) (keybind previous-file ($esc "p "f)) (keybind write-file ($esc "w "f)) (keybind write-file ($R13 "w)) }}} {{{ modes (keybind O_LANGUAGE ($esc "l "a)) (keybind O_LANGUAGE ($R13 "l)) (keybind add-mode-autosave ($esc "+ "a)) (keybind add-mode-echo ($esc "+ "e)) (keybind add-mode-overwrite ($esc "+ "o)) (keybind add-mode-overwrite ($R13 $Ins)) (keybind add-mode-view ($esc "+ "v)) (keybind delete-mode-autosave ($esc "- "a)) (keybind delete-mode-echo ($esc "- "e)) (keybind delete-mode-overwrite ($esc "- "o)) (keybind delete-mode-overwrite ($Ins)) (keybind delete-mode-view ($esc "- "v)) (keybind reset-user-mode ($esc "- "u)) (keybind set-user-mode ($esc "+ "u)) (keybind define-tab ($esc $tab)) }}} {{{ arguments (keybind set-argument-0 ($esc "0)) (keybind set-argument-0 ($R13 "0)) (keybind set-argument-1 ($esc "1)) (keybind set-argument-1 ($R13 "1)) (keybind set-argument-2 ($esc "2)) (keybind set-argument-2 ($R13 "2)) (keybind set-argument-3 ($esc "3)) (keybind set-argument-3 ($R13 "3)) (keybind set-argument-4 ($esc "4)) (keybind set-argument-4 ($R13 "4)) (keybind set-argument-5 ($esc "5)) (keybind set-argument-5 ($R13 "5)) (keybind set-argument-6 ($esc "6)) (keybind set-argument-6 ($R13 "6)) (keybind set-argument-7 ($esc "7)) (keybind set-argument-7 ($R13 "7)) (keybind set-argument-8 ($esc "8)) (keybind set-argument-8 ($R13 "8)) (keybind set-argument-9 ($esc "9)) (keybind set-argument-9 ($R13 "9)) }}} {{{ standard-macros (keybind skip-mode ($esc "s "m)) (keybind standard-up ($esc "s "u)) (keybind standard-down ($esc "s "d)) (keybind standard-filter ($esc "s " )) (keybind inv-blank-handle ($esc "s "b)) (keybind set-fill-column ($esc "s ".)) (keybind parens ( "( )) (keybind brackets ( "[ )) (keybind curly-brackets ( "{ )) (keybind doublequotes ( "" )) (keybind singlequotes ( "' )) (keybind semicolon ( "; )) }}} {{{ games (keybind towers-of-hanoi ($esc "t "o)) (keybind maze-step ($esc "m "s)) (keybind get-new-maze ($esc "g "m)) (keybind set-destination ($esc "m "d)) }}} ) }}} {{{ emacs (mode emacs {{{ moving cursor (keybind backward-character (C-B)) (keybind backward-character ($left)) (keybind forward-character (C-F)) (keybind forward-character ($right)) (keybind previous-line (C-P)) (keybind previous-line ($up)) (keybind next-line (C-N)) (keybind next-line ($down)) (keybind backward-word (M-"b)) (keybind forward-word (M-"f)) (keybind beginning-of-line (C-A)) (keybind end-of-line (C-E)) (keybind beginning-of-fold (M-"<)) (keybind end-of-fold (M-">)) (keybind previous-page (M-"v)) (keybind previous-page ($R9)) (keybind next-page (C-V)) (keybind next-page ($R15)) (keybind goto-line (M-"g)) }}} {{{ folding (keybind open-fold (C-O)) (keybind close-fold (C-C)) (keybind enter-fold (M-C-O)) (keybind exit-fold (M-C-C)) (keybind unfold-fold (C-U)) (keybind create-fold (M-C-N)) (keybind create-auto-fold (M-C-A C-N)) (keybind auto-header (M-C-A C-H)) (keybind toggle-create-file-fold (C-X "a "c)) (keybind open-file-fold (C-X "a "o)) }}} {{{ editing (keybind newline-and-indent (C-J)) (keybind newline-and-indent (C-M)) (keybind delete-previous-character (C-H)) (keybind delete-character (C-D)) (keybind delete-character (C-?)) (keybind transpose-characters (C-T)) (keybind case-word-capitalize (M-"c)) (keybind case-word-lower (M-"l)) (keybind case-word-upper (M-"u)) (keybind delete-to-end-of-line (C-K)) (keybind delete-line (C-X C-K)) (keybind undo-delete-line (C-X C-Y)) (keybind kill-line (M-C-K)) (keybind copy-to-kill-buffer (M-"w)) (keybind fold-kill-buffer (C-Y)) }}} {{{ search & replace (keybind search-forward (C-S)) (keybind search-reverse (C-R)) (keybind incremental-search (C-X "s)) (keybind reverse-incremental-search (C-X "r)) (keybind replace-string (M-"r)) (keybind query-replace-string (M-C-R)) }}} {{{ files (keybind insert-file (C-X C-I)) (keybind save-file (C-X C-S)) (keybind write-file (C-X C-W)) (keybind read-file (C-X C-R)) (keybind next-file (C-X C-N)) (keybind previous-file (C-X C-P)) }}} {{{ macros (keybind define-macro (C-X "()) (keybind define-macro (C-X "))) (keybind execute-macro (C-X "e)) }}} {{{ shell commands (keybind i-shell (C-X "c)) (keybind shell-command (C-X "!)) }}} {{{ modes (keybind add-mode-view (C-X "m "v)) (keybind delete-mode-view (C-X C-M "v)) (keybind add-mode-overwrite (C-X "m "o)) (keybind delete-mode-overwrite (C-X C-M "o)) (keybind add-mode-autosave (C-X "m "a)) (keybind delete-mode-autosave (C-X C-M "a)) (keybind set-language (C-X "m "l)) }}} {{{ arguments (keybind set-argument-0 (M-"0)) (keybind set-argument-1 (M-"1)) (keybind set-argument-2 (M-"2)) (keybind set-argument-3 (M-"3)) (keybind set-argument-4 (M-"4)) (keybind set-argument-5 (M-"5)) (keybind set-argument-6 (M-"6)) (keybind set-argument-7 (M-"7)) (keybind set-argument-8 (M-"8)) (keybind set-argument-9 (M-"9)) }}} {{{ special functions (keybind redraw-display (C-L)) (keybind help (M-"?)) (keybind describe-bindings (C-X "?)) (keybind describe-fold (C-X "=)) }}} {{{ how to get out (keybind exit-origami (C-X C-C)) (keybind quick-exit (M-"z)) }}} (keybind kbd_ch ($esc "k "b)) ) }}} }}}