KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q30033: Microsoft Editor Macro Moves Text with TAB Key

Article: Q30033
Product(s): See article
Version(s): 1.00   | 1.00
Operating System(s): MS-DOS | OS/2
Keyword(s): ENDUSER | | mspl13_basic
Last Modified: 6-JAN-1989

The TAB key only moves the cursor. It does not move both the cursor
and the text under the cursor (as it does in QuickC, Word, and many
other editors).

To move text and the cursor, put the following macro in your TOOLS.INI
file in the [M] and/or [MEP] section(s):

   ;Macro to tab with insertion, as in QuickC and Word
       emacstab:=arg tab sinsert tab
       emacstab:ctrl+tab

The "emacstab" macro (there is no significance to the name other than
its similarity to M.EXE's EMACSNEWL and EMACSDEL functions) is invoked
by pressing CTRL+TAB.

Note: assigning this macro to CTRL+TAB will only function on
enhanced-style keyboards. Older-style keyboards must use another set
of keys for this macro assignment. On the older keyboards, assigning
this macro to CTRL+TAB causes the macro to be ignored.

The emacstab macro functions as follows:

1. The Arg command introduces the argument (in this case, a
   "stream" arg).

2. The Tab command moves you one tab stop to the right.

3. The Sinsert command moves the highlighted text over to the tab
   stop.

This macro leaves your cursor back where it started, so one more TAB
moves your cursor to the right (on top of the shifted text).

THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Copyright Microsoft Corporation 1986-2002.