Share via


Creating Bookmarks and Task List Shortcuts

Bookmarks and shortcuts allow you to move easily through your code. You can set bookmarks and shortcuts, and then use shortcut keys to cycle through them. Bookmarks are temporary. They are retained when the editing window is closed and reopened, but they are not retained after exiting and restarting Visual FoxPro.

Shortcuts are similar to named bookmarks and are persisted between editing sessions. When you create a shortcut in your code, an entry is made in the Task List making it easy to move quickly to the marked code. You can step through shortcuts in the same way you step through bookmarks.

Bookmarks are related to the editor window rather than to content. During an edit session, bookmarks are related to the position within the window and not to the actual content of the file. Consequently, certain edit operations, such as text insertions before a bookmark, cause that bookmark to relate to a different line than the one with which it was previously associated. If the new line association is not desirable, you should remove the existing bookmark or shortcut and add a new one in the desired location.

Each line of code can contain either a bookmark or a shortcut, but not both on the same line.

If the Selection Margin is not available in the Editor, use the Editor Tab, Options Dialog Box to specify the margin.

To create bookmarks

  • In the Editor, place the mouse cursor in the Selection Margin next to the code line you want to mark, and then press SHIFT while double-clicking.

    -or-

    In the Editor, place the cursor in the code line you want to mark, and then press ALT + SHIFT + F2.

To create task list shortcuts

  • In the Editor, place the mouse cursor in the Selection Margin next to the code line you want to mark, and then press CTRL while double-clicking.

    -or-

    In the Editor, place the cursor in the code line you want to mark, and then press ALT + F2.

To move between bookmarks and shortcuts

  1. To move to the next bookmark, press F2.
  2. To move to the previous bookmark, press SHIFT + F2.

To remove a bookmark

  • In the Editor, place the mouse cursor in the Selection Margin on the bookmark icon, and then press SHIFT while double-clicking.

    -or-

    In the Editor, place the cursor in the code line you want to remove the mark from, and then press ALT + SHIFT + F2.

    -or-

    Delete the code containing the bookmark.

To remove a shortcut

  • In the Editor, place the mouse cursor in the Selection Margin on the bookmark icon, and then press CTRL while double-clicking.

    -or-

    In the Editor, place the cursor in the code line you want to remove the mark from, and then press ALT + F2.

    -or-

    Delete the code containing the shortcut.

See Also

Testing a Project | Editor Tab, Options Dialog Box | Using the Task List Manager | Task List Manager Window