Moving Around in Source Files

The text editor provides a variety of methods to move around in a source file. In addition to using the regular mouse movement and page controls, you can:

Using Go To

There is no distinct Go To dialog box. To position the cursor, you can simply change the corresponding field in the StatusBar and press RETURN.


Using Bookmarks

Please note: Bookmarks are not supported with the current release. The functionality described below will be implemented in a future release.

You can set bookmarks to mark frequently accessed lines in your source file. Once a bookmark is set, you can use menu or keyboard commands to move to it. You can remove a bookmark when you no longer need it.

You can use both named and unnamed bookmarks. Named bookmarks are saved between editing sessions. Once you create a named bookmark, you can jump to that location whether or not the file is open. Named bookmarks store both the line number and the column number of the location of the cursor when the bookmark was created. This location is adjusted whenever you edit the file. Even if you delete the characters around the bookmark, the bookmark remains in the correct location.

Unnamed bookmarks are temporary. They are removed when the file containing them is closed or reloaded. Unnamed bookmarks store only the current line, not the column offset of the cursor. When a line containing an unnamed bookmark is deleted, the bookmark is also removed. You can jump to an unnamed bookmark by activating the file and using either the BookmarkNext or BookmarkPrev command. The advantage of unnamed bookmarks is that they are very easy to set (just use BookmarkToggle), and they provide you with visible feedback in the selection margin of your document.

To set a named bookmark

  1. Move the insertion point to the line and column where you want to set a named bookmark.
  2. From the Edit menu, choose Bookmark. The Bookmark dialog box appears.
  3. In the Name box, type the name of the bookmark.
  4. Choose the Add button to add the named bookmark to the list of bookmarks.
  5. Choose the Close button.

To remove multiple named bookmarks

  1. From the Edit menu, choose Bookmark. The Bookmark dialog box appears.
  2. In the Name box, select the names of the bookmarks to be removed.
  3. Choose the Delete button to remove the selected bookmarks.
  4. Choose the Close button.

To go to a named bookmark

  1. From the Edit menu, choose Bookmark. The Bookmark dialog box appears.
  2. In the Name box, select the name of the bookmark to go to.
  3. Choose the Go To button.

To remove a named bookmark

  1. From the Edit menu, choose Bookmark. The Bookmark dialog box appears.
  2. In the Name box, select the name of the bookmark to be removed.
  3. Choose the Delete button to remove the selected bookmark.
  4. Choose the Close button.

To set an unnamed bookmark

  1. Move the insertion point to the line where you want to set a bookmark.
  2. Press the BookmarkToggle key combination. The line is selected, or marked in the margin if you have set the selection margin.
  3. To move to the next bookmark after the insertion point
  4. To move to the previous bookmark before the insertion point

To remove an unnamed bookmark

  1. Move the insertion point to anywhere on the line containing the unnamed bookmark.
  2. Press the BookmarkToggle key combination.
Note Bookmarks can open files or activate different files in the open Windows list. These commands are an easy way to move between text in a number of different source files. For more information on opening files, see Opening Files.


The Navigating Commands

The text editor commands for moving around in a source file are described in the following table.

CommandDescription
CharLeft Moves the cursor one character to the left.
CharRight Moves the cursor one character to the right.
DocumentEnd Moves the cursor to the end of the file.
DocumentStart Moves the cursor to the beginning of the file.
Home Moves the cursor alternately between the beginning of the current line and the beginning of the text on that line.
LineDown Moves the cursor one line downward.
LineEnd Moves the cursor to the end of the text on the current line.
LineStart Moves the cursor to the beginning of the current line.
LineUp Moves the cursor one line upward.
PageDown Moves the cursor one page downward.
PageUp Moves the cursor one page upward.

Note The command Home is distinct from the LineStart command. LineStart always moves the cursor to the first column in the line, while Home moves the cursor to different locations depending on the cursor’s current location. The Home command moves the cursor to the first non-blank character in the line. However, if the cursor is already located on the first non-blank character, Home moves to the first column of the line.


© Copyright 1997 Hewlett-Packard GmbH. All rights reserved.
Revision: 98/02/18