scroll-left - Move the window left (scrolling)
scroll-right - Move the window right (scrolling)
n scroll-left (C-x <)
n scroll-right (C-x >)
scroll-left moves the window in current buffer left by 1 screen width. If an argument n is supplied then the resolution of movement is specified in characters relative to the current displacement. Moving the window in the current buffer left by n characters (that is if the current left-hand margin of the screen is column 0, the left hand margin becomes column n).
scroll-right moves the window in current buffer right by 1 screen width. If an argument n is supplied then the resolution of movement is specified in characters relative to the current displacement.
The ends of the lines of a scrolled screen are delimited with a dollar ($) character indicating that the text continues. When no scroll is in effect the left hand margin of the screen does not show the $ symbol. i.e. The line This text is scrolled on this line with a current scroll offset of 2 in a 22 column window would appear as follows:
22 |<------------------->| |$s text is scrolled $|
The amount of scroll (n) is effectively unlimited, it is possible to scroll all of the text in a buffer out of the window, when only $'s appear in the left margin, in the last highlighting color of the line (blank lines always remain blank and are not delimited with a $). Text on the current line is handled according to the value of $scroll(5) as follows:
$scroll 0
All of user text appears
|$f line of te$| |At start of l$| |$f line of te$|
Surrounding lines commence with "$" indicates at the start of the line.
$ in column 0
|$f line of te$| |$f line of te$| |$f line of te$|
Text column is the same as the surrounding text i.e. the line and window scroll are the same.
> Left of scroll position
|$f line of te$| |>f line of te$| |$f line of te$|
The current line is to the left of the scrolled position. forward-char (i.e. interpret as --> indicating the direction of travel) moves the cursor, and therefore the line, towards the natural scroll position ($ in column).
< Right of scroll position
|$f line of te$| |<f line of te$| |$f line of te$|
The current line is to the right of the scrolled position. backward-char (i.e. interpret as <-- indicating the direction of travel) moves the cursor, and therefore the line, towards the natural scroll position ($ in column).
$scroll 1
The scrolling is an attribute of the WINDOW and not the BUFFER. If the window is closed, or contents swapped to a different buffer then the scroll setting is reset for the next buffer. A return to the previous buffer does not restore the scroll setting. The only case where scrolling is inherited is when a window is split (see split-window-vertically(2)).
When binding scroll-left to the keyboard then it is important to note that when no argument is specified the resolution is screen-width's. A key binding would operate on character multiples, hence the command should be bound with a numeric argument to perform the perform the keyboard action. e.g.
1 global-bind-key scroll-left "A-left" 1 global-bind-key scroll-right "A-right"
To move 5 columns on a key stroke, for an accelerated scroll, then the binding may be re-written as:-
5 global-bind-key scroll-left "A-left" 5 global-bind-key scroll-right "A-right"
(c) Copyright JASSPA 1999
Last Modified: 1998/08/05
Generated On: 1999/12/01