Creating a Bookmark in the FoxPro Editor

ID: Q97168

The information in this article applies to:

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

Last Reviewed: June 27, 1995