mark Command

Sets up or finds a position mark.

Scope: File

Syntax

Parameters

Name 
A name identifying a named mark. The name is truncated if longer than 32 characters. The setting and comparison of this name is not case sensitive.
Id 
An id number identifying an unnamed mark.
set 
Assign the mark Name or Id to the specified position. If no position is specified, the current position is used.

If Name is already in use, it is reassigned to the current position.

Specify Id only if that id already exists and you want to move a mark associated with a specific id number. Otherwise, issue the following command to create a new mark:

mark set # 

The Editor will assign the next available id number to the new mark. You can get the id of the new mark by querying the markid parameter.

find 
Set the current cursor position to the position recorded by the mark set Name or mark set #Id commands. The mark specified must exist in the current file.
clear 
Cancel the specified mark.
StartLine 
The starting line of the mark. This value must be an integer.
StartColumn 
The starting column of the mark. This value must be an integer.
EndLine 
The ending line of the mark. This value must be an integer .
EndColumn 
The ending column of the mark. This value must be an integer.
include 
Display lines associated with the specified mark as follows:
on 
Hide from display lines that are not associated with the mark.
off 
Do not hide from display lines that are not associated with the mark.
inverse 
Toggle between on and off.
exclude 
Display lines associated with the mark Name as follows:
on 
Hide from display lines that are associated with the mark.
off 
Do not hide from display lines that are associated with the mark.
inverse 
Toggle between on and off.
setfont 
Display the specified mark in the character size and font specified by Font. If Font is not specified, the mark displays in the default editing window font. Font can be any valid font name as described in the help for the font parameter.

Description

Marks function like a bookmark. Use the mark command to position new marks or relocate existing marks. Once set, you can use the mark command to quickly find marked locations in your document.

You can also use the mark command to highlight your marked locations, or to include or exclude marked locations from view.

When including or excluding marked areas for display, lines are displayed according to the following rules of precedence:

  1. If the showcurrent parameter is set to on, the line is displayed.
  2. If the line has in it an excluded mark or class, it is not displayed.
  3. If the line does not belong to an included class, it is not displayed.
  4. If the line is set as a show line by the show parameter, and the shows parameter is set to off, it is not displayed.
  5. If there are one or more included marks, and the line does not include one of those marks, it is not displayed. Marks are not saved when the file is closed.

Examples

  1. To mark a position in a file with the name undoref, type:
    mark set undoref 

    The mark's name is undoref.

  2. To move the cursor to the mark undoref, type:
    mark find undoref 
  3. To mark a position in a file with an unnamed mark, type:
    mark set # 

    You can query the markid parameter to get the id number of the new mark,

  4. To move the cursor to the mark with id 276, type:
    mark find #276
  5. To highlight the mark with id 276 using a font with name M, type:
    mark setfont #276 M 
  6. If font M does not yet exist, you can create it using the font parameter. For example, to use a red foreground on yellow background to highlight your mark, type the following commands:
    set font M red/yellow
    mark setfont #276 M 
  7. To clear highlighting for the mark with id 276, type:
    mark setfont #276
  8. To display only lines associated with the mark area1, type:
    mark include area1 on 
  9. To exclude from display lines associated with the mark area1, type:
    mark exclude area1 on 

API Return Codes

-1 
The file is empty.
-2 
No name specified.
-3 
A parameter issued with the command was not valid. Check the command 's syntax requirements and then issue the command again using a valid parameter.
-8 
Insufficient storage to continue.
1 
Mark not found. The specified name is unknown.
2 
The specified name was already in use. It is now overridden.
3 
The mark refers to a line that has been deleted.

font Parameter
mark Parameter
markexclude Parameter
markfont Parameter
markid Parameter
markinclude Parameter
show Parameter
shows Parameter