scrollcommand

Format 1: scrollcommand [+ | -] max [l | c] [pixels] [wid=num]

Format 2: scrollcommand [+ | -] page [l | c] [pixels] [wid=num]

Format 3: scrollcommand [+ | -] count [l | c] [pixels] [wid=num]

Scrolls the window indicated by the identification number num by a certain amount in the given direction.

With Format 1, the window is scrolled completely to the beginning (-max) or the end of its view (+max or max).

With Format 2, the window is scrolled to the previous page (-page) or the next page (+page or page).

With Format 3, the window is scrolled by the given number of lines or columns.

If count, max, or page is followed by a c, then the scroll is horizontal and count corresponds to the number of characters.

If count, max, or page is followed by the letter l, then the scroll is vertical and count corresponds to the number of lines.

If pixels is also specified, then it scrolls by that many additional pixels. Not all windows scroll on a per pixel basis; some are constrained to full lines. Both count and pixels may be negative.

The window identification number num is obtained by using the special sequence %w with either the mouse command or the keybind command. If no window identification number is supplied, the source window is used. See mouse and keybind.

For example,

The following example scrolls the source pane one line towards the end of the file:

scrollcommand 1

The following scrolls the command pane backwards by two lines:

scrollcommand -2 wid=-2

The following scrolls the source pane three characters to the right:

scrollcommand 3c

Both the following commands scroll the source pane to the beginning of the code:

scrollcommand -max
scrollcommand -maxl wid=-1

See also bsearch and fsearch.


Previous

Next



Copyright © 1999, Green Hills Software. All rights reserved.