⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 temc.doc

📁 一些网络上用到的知识
💻 DOC
📖 第 1 页 / 共 3 页
字号:
===========================================================================
===========================================================================

                             TEMC.DOC

===========================================================================
Turbo Editor macros
===========================================================================

          TEMC.EXE is an editor macro compiler for the IDE. It
          processes a script file that defines editor macros and
          key bindings, and produces a configuration file that is
          read by the IDE to define the effects of keyboard
          commands in the editor.

          The file DEFAULTS.TEM contains the default macro
          definitions and key bindings built into the IDE editor.
          It serves as an example script, as well as a base from
          which to customize the editor. Several other .TEM files
          are also provided for your convenience.

===========================================================================
TEMC command line
===========================================================================

          TEMC is invoked from the DOS command line. Type

              temc [-c] <script file>[.TEM] <config file><.TP>

          The script file extension is assumed to be .TEM if not
          otherwise specified. The configuration file extension
          must be .TP.

          TEMC requires that you have an existing .TP file, which
          will be used to store the new key bindings from your
          script.  You must specify the name of your .TP file
          when invoking TEMC.

          The optional -c switch can also be specified as /c, and
          can appear in any argument position on the command
          line. If you use this option, any existing command
          table in your configuration file is thrown away before
          TEMC processes the script file. When -c is not used,
          the key bindings in the script file are merged with
          those already defined in the configuration file.

          You can use DEFAULTS.TEM to re-create exactly the
          default settings of the editor command set. This
          file is included as both a sample script file and as
          the default command table. You can copy it and modify
          it for your own use.

===========================================================================
Syntax
===========================================================================

          The syntax to define a macro is

              MACRO <macroname>
                <command1>;
                [ <command2>; ... ]
              END;

          <macroname> can consist of anything that is a legal C
          symbol, and <command> can be either the name of another
          predefined macro or a predefined TEMC editor command. A
          list of editor commands and what they do follows.

          When you define your macro, the following points are
          valid:

          1. A statement defines either a named macro or a key
             binding.

          2. Spaces and new lines are optional.

          3. Comments are in C-style /* ... */ pairs.

          4. Unlike C, TEMC's language is case insensitive.

          5. Some of the predefined editor commands have a syntax
             that looks like a C function call with one argument.
             For example,

                 SetMark(5);

             Depending on the command, the argument is either a
             decimal integer constant, a character constant, or a
             string literal. All are specified using C syntax.

          Here's an example of a macro definition from
          DEFAULTS.TEM:

              MACRO MacScrollUp
                ScrollScreenUp; FixCursorPos;
              END;

          The syntax to define a key binding is

              <key-sequence>: <command>;

             or

              <key-sequence>: BEGIN <command1>; [ <command2>; ... ]
              END;

          The <key-sequence> is either a key (a character
          optionally preceded by Ctrl or Alt), or a series of
          keys separated by a plus sign (+). Note that the
          specification of the key characters themselves is case
          sensitive. For example, Ctrl+k B is different than
          Ctrl+k b, even though the latter is the same as Ctrl+K b.

          White space is allowed between the key-sequence and the
          colon, and each <command> can be either the name of a
          previously defined macro, or one of the predefined
          editor commands listed in Table 1.1.

===========================================================================
Key codes
===========================================================================

          The IDE editor makes use of an extended character set
          that includes key combinations not normally available
          to DOS programs. Key codes can be specified in a script
          through any combination of the symbols "Ctrl+", "Shift+",
          "Alt+" and a character.

          Some keys cannot be entered directly into a TEMC
          script. Those keys can be referred to by their names,
          as described in the following table.

          Any key in a sequence--except the first key--can be
          preceded by one of the characters ^ or @. The caret (^)
          indicates that any combination of case and "Ctrl" can
          be used to type the key; that is, lowercase, uppercase,
          or control characters. The @ sign is used to indicate
          that case is insignificant for the following character,
          although "Ctrl" is not accepted. For example,

          * Ctrl+k b specifies a Ctrl+K followed by a lowercase b.

          * Ctrl+k ^b specifies a Ctrl+K followed by any of b, B,
            or Ctrl+B.

          * Ctrl+k @B specifies Ctrl+K followed by either b or B.

     Named keys

          Key are specified as letters, numbers, or characters,
          optionally preceded by one or more of Ctrl+, Alt+ or
          Shift+. The following names specify keys that cannot be
          typed as themselves in the TEMC syntax.

          -------------------------------------------------------
             Key name    Notes
          -------------------------------------------------------
             Home
             End
             PgUp
             PgDn
             LfAr        Left arrow
             RgAr        Right arrow
             UpAr        Up arrow
             DnAr        Down arrow
             Ins
             Del
             Enter
             Return      Same as Enter
             BkSp        Backspace
             Tab
             BkTab       No longer available, use Shift+Tab
             Esc
             Star        * key on the numeric keypad
             Minus       - key on the numeric keypad
             Plus        + key on the numeric keypad
             Space       Spacebar
             PrtSc
             F1 to F10   Function keys

===========================================================================
Predefined editor commands
===========================================================================

          TEMC lets you use built-in editor commands and user-
          defined macros as commands within macros interchangeably
          as long as you don't create any loops by having two
          macros calling each other, even via intermediate macros.
          Note that some commands cause an escape from the editor
          to the surrounding IDE, for example, by bringing up a
          dialog box. Your macro will "pause" until control returns
          to the editor.

          A list of all predefined TEMC editor commands is shown
          next. Commands that cause an escape from the editor
          follow.

     TEMC editor commands

          -------------------------------------------------------
          Command name                What the editor does
          -------------------------------------------------------

          BackspaceDelete             Deletes character before
                                      the cursor.

          BottomOfScreen              Moves cursor to the bottom
                                      line of the current window,
                                      leaving column unchanged.

          CenterFixScreenPos          Adjusts the screen display
                                      to ensure the cursor is
                                      visible. If any adjustment
                                      is necessary, adjust the
                                      display so the cursor is
                                      close to being centered in
                                      the window.

          CopyBlock                   If there is a valid and
                                      highlighted (selected)
                                      text block, then at the
                                      cursor location, inserts a
                                      copy of the characters that
                                      are selected and makes that
                                      the new selected text
                                      location.

          CursorCharLeft              Moves cursor left over one
                                      character. This command
                                      will skip over tab
                                      characters and move to the
                                      end of the previous line.

          CursorCharRight             Moves cursor right over one
                                      character. This  command

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -