Creating a Bookmark in the FoxPro Editor

Last reviewed: June 27, 1995
Article ID: Q97168
The information in this article applies to:
  • Microsoft FoxPro for Windows, versions 2.5 and 2.5a
  • Microsoft FoxPro for MS-DOS, versions 1.02, 2.0, 2.5, and 2.5a

SUMMARY

You can create a simple bookmark utility for the FoxPro editor by using two ON KEY LABEL commands, as demonstrated below.

MORE INFORMATION

A feature frequently requested for FoxPro's editor is a split screen, to allow one part of a lengthy program to be displayed for reference while coding in another. Although two editing sessions of the same file can be run simultaneously, this arrangement is cumbersome.

If you just need to refer to another section and then quickly continue coding, do the following to create bookmarks:

  1. Set insert mode to ON.

  2. Issue the following ON KEY LABEL commands before starting the edit session:

          ON KEY LABEL ` KEYBOARD "{SPACEBAR}{SHIFT+LEFTARROW}{DEL}"
          ON KEY LABEL ~ KEYBOARD "{CTRL+U}{DEL}"
          * For FoxPro for Windows, replace CTRL+U in the previous command
          * with CTRL+Z.
    

    The label characters are the ACCENT GRAVE (`) and TILDE (~) keys, chosen for their rare usage and convenient location in the upper-left corner of most keyboards.

         Note: In FoxPro, the ACCENT GRAVE key acts as an extender key for
         direct entry of printable extended characters, and must be
         pressed twice to actually be entered as itself.
    

  3. Use MODIFY COMMAND to modify a program file containing more than one screen of lines.

  4. Press the CTRL+END keys to move to the bottom of the file. Type "THIS IS THE END", then press the ACCENT GRAVE (`) key.

  5. Press the CTRL+HOME keys to move to the top of the file, read the line there, then press the TILDE key (~) (SHIFT+ACCENT GRAVE) and note the location of the cursor. The bookmark will remain set during the session until you reset it. Each control can be reissued in any sequence and any number of times.


Additional reference words: FoxDos FoxWin 1.02 2.00 2.50 2.50a placeholder
KBCategory: kbprg
KBSubcategory: FxprgGeneral


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.

Last reviewed: June 27, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.