Partager via


How to: Create Bookmarks and Task List Shortcuts

You can set bookmarks and shortcuts for code in an editing window so you can navigate your code more easily during the programming and debugging processes. By setting bookmarks, you can navigate between bookmarks in your code.

By creating shortcuts, you can create tasks in the Task List Manager associated with those shortcuts. When you create a shortcut in your code, an entry appears in the Tasks window of the Task List Manager for you to create a task, which makes it possible for you to move quickly to the marked code. For more information, see How to: Use the Task List Manager and Task List Manager Window.

Note

Before you can create bookmarks and shortcuts, you must have previously saved the file. You can create a bookmark or a shortcut but not both for a line of code. Bookmarks and shortcuts relate to the position of a line of code in the editing window rather than the code itself. Therefore, certain editing operations, such as inserting text before a bookmark, can cause the line of code that a bookmark or shortcut refers to move to a different line. If you do not want the bookmark to refer to the new line, remove the bookmark or shortcut and add a new one in the desired location.

To create bookmarks and shortcuts

  1. If your code file has not been saved, save the file.

  2. In the line of code that you want to create a bookmark, insert the mouse cursor.

  3. On the Edit menu, point to Bookmarks.

  4. To create a bookmark, click Toggle Bookmark.

    A rectangle appears in the selection margin on the left side of the editing window.

    Tip

    If the selection margin does not appear in the editing window, you can specify the margin on the Editor tab in the Options dialog box. For more information, see Editor Tab, Options Dialog Box.

    -OR-

    To create a shortcut, click Toggle Task List Shortcut.

    A curved arrow appears in the selection margin on the left side of the editing window.

You can also create a bookmark by placing the mouse cursor in the selection margin next to the line of code and pressing the SHIFT key while double-clicking. You can also create a shortcut by placing the mouse cursor in the selection margin next to the line of code line and pressing the CTRL key while double-clicking. You can also create and navigate bookmarks and shortcuts using shortcut keys. For information about keyboard shortcuts, see Keyboard Shortcuts (Visual FoxPro).

Note

Bookmarks are preserved when you close and reopen the editing window, but they do not exist after exiting and restarting Visual FoxPro. Shortcuts persist between editing sessions.

To navigate bookmarks and shortcuts

  • On the Edit menu, click Next Bookmark/Shortcut or Previous Bookmark/Shortcut.

To remove bookmarks and shortcuts

  1. In the line of code that you want to remove a bookmark or shortcut, insert the mouse cursor.

  2. On the Edit menu, point to Bookmarks. To remove a bookmark, click Toggle Bookmark.

    -OR-

    To remove a shortcut, click Toggle Task List Shortcut.

See Also

Other Resources

Programming in Visual FoxPro

Testing and Debugging Applications