/usr/share/doc/vim-doc/html/scroll.html is in vim-doc 2:7.3.429-2ubuntu2.2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 | <HTML>
<HEAD>
<META HTTP-EQUIV="Content-type" content="text/html; charset=ISO-8859-1">
<TITLE>Vim documentation: scroll</TITLE>
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>Vim documentation: scroll</H1>
<A NAME="top"></A>
<A HREF="index.html">main help file</A>
<HR>
<PRE>
*<A NAME="scroll.txt"></A><B>scroll.txt</B>* For Vim version 7.3. Last change: 2006 Aug 27
VIM REFERENCE MANUAL by <A HREF="intro.html#Bram">Bram</A> <A HREF="intro.html#Moolenaar">Moolenaar</A>
Scrolling *<A NAME="scrolling"></A><B>scrolling</B>*
These commands move the contents of the <A HREF="windows.html#window">window</A>. If the cursor position is
moved off of the <A HREF="windows.html#window">window</A>, the cursor is moved onto the <A HREF="windows.html#window">window</A> (with
<A HREF="options.html#'scrolloff'">'scrolloff'</A> screen lines around <A HREF="motion.html#it">it</A>). A page is the number of lines in the
<A HREF="windows.html#window">window</A> minus two. The mnemonics for these commands may be a bit confusing.
Remember that the commands refer to moving the <A HREF="windows.html#window">window</A> (the part of the buffer
that you see) upwards or downwards in the buffer. When the <A HREF="windows.html#window">window</A> moves
upwards in the buffer, the text in the <A HREF="windows.html#window">window</A> moves downwards on your screen.
See section |<A HREF="usr_03.html#03.7">03.7</A>| of the user manual for an introduction.
1. Scrolling downwards |<A HREF="#scroll-down">scroll-down</A>|
2. Scrolling upwards |<A HREF="#scroll-up">scroll-up</A>|
3. Scrolling relative to cursor |<A HREF="#scroll-cursor">scroll-cursor</A>|
4. Scrolling horizontally |<A HREF="#scroll-horizontal">scroll-horizontal</A>|
5. Scrolling synchronously |<A HREF="#scroll-binding">scroll-binding</A>|
6. Scrolling with a mouse wheel |<A HREF="#scroll-mouse-wheel">scroll-mouse-wheel</A>|
==============================================================================
1. Scrolling downwards *<A NAME="scroll-down"></A><B>scroll-down</B>*
The following commands move the edit <A HREF="windows.html#window">window</A> (the part of the buffer that you
see) downwards (this means that more lines downwards in the text buffer can be
seen):
*<A NAME="CTRL-E"></A><B>CTRL-E</B>*
<A HREF="#CTRL-E">CTRL-E</A> Scroll <A HREF="windows.html#window">window</A> <A HREF="intro.html#[count]">[count]</A> lines downwards in the buffer.
Mnemonic: Extra lines.
*<A NAME="CTRL-D"></A><B>CTRL-D</B>*
<A HREF="#CTRL-D">CTRL-D</A> Scroll <A HREF="windows.html#window">window</A> Downwards in the buffer. The number of
lines comes from the <A HREF="options.html#'scroll'">'scroll'</A> option (default: half a
screen). If <A HREF="intro.html#[count]">[count]</A> given, first set <A HREF="options.html#'scroll'">'scroll'</A> option
to <A HREF="intro.html#[count]">[count]</A>. The cursor is moved the same number of
lines down in the file (if possible; when lines wrap
and when hitting the end of the file there may be a
difference). When the cursor is on the last line of
the buffer nothing happens and a beep is produced.
See also <A HREF="options.html#'startofline'">'startofline'</A> option.
{difference from <A HREF="options.html#vi:">vi:</A> Vim scrolls <A HREF="options.html#'scroll'">'scroll'</A> screen
lines, instead of file lines; makes a difference when
lines wrap}
<A HREF="#<S-Down>"><S-Down></A> or *<A NAME="<S-Down>"></A><B><S-Down></B>* *<A NAME="<kPageDown>"></A><B><kPageDown></B>*
<A HREF="#<PageDown>"><PageDown></A> or *<A NAME="<PageDown>"></A><B><PageDown></B>* *<A NAME="CTRL-F"></A><B>CTRL-F</B>*
<A HREF="#CTRL-F">CTRL-F</A> Scroll <A HREF="windows.html#window">window</A> <A HREF="intro.html#[count]">[count]</A> pages Forwards (downwards) in
the buffer. See also <A HREF="options.html#'startofline'">'startofline'</A> option.
When there is only one <A HREF="windows.html#window">window</A> the <A HREF="options.html#'window'">'window'</A> option
might be used.
*<A NAME="z+"></A><B>z+</B>*
<A HREF="#z+">z+</A> Without <A HREF="intro.html#[count]">[count]</A>: Redraw with the line just below the
<A HREF="windows.html#window">window</A> at the top of the <A HREF="windows.html#window">window</A>. Put the cursor in
that line, at the first non-blank in the line.
With <A HREF="intro.html#[count]">[count]</A>: just like "<A HREF="#z<CR>">z<CR></A>".
==============================================================================
2. Scrolling upwards *<A NAME="scroll-up"></A><B>scroll-up</B>*
The following commands move the edit <A HREF="windows.html#window">window</A> (the part of the buffer that you
see) upwards (this means that more lines upwards in the text buffer can be
seen):
*<A NAME="CTRL-Y"></A><B>CTRL-Y</B>*
<A HREF="#CTRL-Y">CTRL-Y</A> Scroll <A HREF="windows.html#window">window</A> <A HREF="intro.html#[count]">[count]</A> lines upwards in the buffer.
Note: When using the <A HREF="os_win32.html#MS-Windows">MS-Windows</A> key bindings <A HREF="#CTRL-Y">CTRL-Y</A> is
remapped to <A HREF="undo.html#redo">redo</A>.
*<A NAME="CTRL-U"></A><B>CTRL-U</B>*
<A HREF="#CTRL-U">CTRL-U</A> Scroll <A HREF="windows.html#window">window</A> Upwards in the buffer. The number of
lines comes from the <A HREF="options.html#'scroll'">'scroll'</A> option (default: half a
screen). If <A HREF="intro.html#[count]">[count]</A> given, first set the <A HREF="options.html#'scroll'">'scroll'</A>
option to <A HREF="intro.html#[count]">[count]</A>. The cursor is moved the same
number of lines up in the file (if possible; when
lines wrap and when hitting the end of the file there
may be a difference). When the cursor is on the first
line of the buffer nothing happens and a beep is
produced. See also <A HREF="options.html#'startofline'">'startofline'</A> option.
{difference from <A HREF="options.html#vi:">vi:</A> Vim scrolls <A HREF="options.html#'scroll'">'scroll'</A> screen
lines, instead of file lines; makes a difference when
lines wrap}
<A HREF="#<S-Up>"><S-Up></A> or *<A NAME="<S-Up>"></A><B><S-Up></B>* *<A NAME="<kPageUp>"></A><B><kPageUp></B>*
<A HREF="#<PageUp>"><PageUp></A> or *<A NAME="<PageUp>"></A><B><PageUp></B>* *<A NAME="CTRL-B"></A><B>CTRL-B</B>*
<A HREF="#CTRL-B">CTRL-B</A> Scroll <A HREF="windows.html#window">window</A> <A HREF="intro.html#[count]">[count]</A> pages Backwards (upwards) in the
buffer. See also <A HREF="options.html#'startofline'">'startofline'</A> option.
When there is only one <A HREF="windows.html#window">window</A> the <A HREF="options.html#'window'">'window'</A> option
might be used.
*<A NAME="z^"></A><B>z^</B>*
<A HREF="#z^">z^</A> Without <A HREF="intro.html#[count]">[count]</A>: Redraw with the line just above the
<A HREF="windows.html#window">window</A> at the bottom of the <A HREF="windows.html#window">window</A>. Put the cursor in
that line, at the first non-blank in the line.
With <A HREF="intro.html#[count]">[count]</A>: First scroll the text to put the <A HREF="intro.html#[count]">[count]</A>
line at the bottom of the <A HREF="windows.html#window">window</A>, then redraw with the
line which is now at the top of the <A HREF="windows.html#window">window</A> at the
bottom of the <A HREF="windows.html#window">window</A>. Put the cursor in that line, at
the first non-blank in the line.
==============================================================================
3. Scrolling relative to cursor *<A NAME="scroll-cursor"></A><B>scroll-cursor</B>*
The following commands reposition the edit <A HREF="windows.html#window">window</A> (the part of the buffer that
you see) while keeping the cursor on the same line:
*<A NAME="z<CR>"></A><B>z<CR></B>*
<A HREF="#z<CR>">z<CR></A> Redraw, line <A HREF="intro.html#[count]">[count]</A> at top of <A HREF="windows.html#window">window</A> (default
cursor line). Put cursor at first non-blank in the
line.
*<A NAME="zt"></A><B>zt</B>*
<A HREF="#zt">zt</A> Like "<A HREF="#z<CR>">z<CR></A>", but leave the cursor in the same
column. {not in Vi}
*<A NAME="zN<CR>"></A><B>zN<CR></B>*
z{height}<CR> Redraw, make <A HREF="windows.html#window">window</A> {height} lines tall. This is
useful to make the number of lines small when screen
updating is very slow. Cannot make the height more
than the physical screen height.
*<A NAME="z."></A><B>z.</B>*
<A HREF="#z.">z.</A> Redraw, line <A HREF="intro.html#[count]">[count]</A> at center of <A HREF="windows.html#window">window</A> (default
cursor line). Put cursor at first non-blank in the
line.
*<A NAME="zz"></A><B>zz</B>*
<A HREF="#zz">zz</A> Like "<A HREF="#z.">z.</A>", but leave the cursor in the same column.
Careful: If caps-lock is on, this command becomes
"<A HREF="editing.html#ZZ">ZZ</A>": write buffer and exit! {not in Vi}
*<A NAME="z-"></A><B>z-</B>*
<A HREF="#z-">z-</A> Redraw, line <A HREF="intro.html#[count]">[count]</A> at bottom of <A HREF="windows.html#window">window</A> (default
cursor line). Put cursor at first non-blank in the
line.
*<A NAME="zb"></A><B>zb</B>*
<A HREF="#zb">zb</A> Like "<A HREF="#z-">z-</A>", but leave the cursor in the same column.
{not in Vi}
==============================================================================
4. Scrolling horizontally *<A NAME="scroll-horizontal"></A><B>scroll-horizontal</B>*
For the following four commands the cursor follows the screen. If the
character that the cursor is on is moved off the screen, the cursor is moved
to the closest character that is on the screen. The value of <A HREF="options.html#'sidescroll'">'sidescroll'</A> is
not used.
<A HREF="#z<Right>">z<Right></A> or *<A NAME="zl"></A><B>zl</B>* *<A NAME="z<Right>"></A><B>z<Right></B>*
<A HREF="#zl">zl</A> Move the <A HREF="starting.html#view">view</A> on the text <A HREF="intro.html#[count]">[count]</A> characters to the
right, thus scroll the text <A HREF="intro.html#[count]">[count]</A> characters to the
left. This only works when <A HREF="options.html#'wrap'">'wrap'</A> is off. {not in
Vi}
<A HREF="#z<Left>">z<Left></A> or *<A NAME="zh"></A><B>zh</B>* *<A NAME="z<Left>"></A><B>z<Left></B>*
<A HREF="#zh">zh</A> Move the <A HREF="starting.html#view">view</A> on the text <A HREF="intro.html#[count]">[count]</A> characters to the
left, thus scroll the text <A HREF="intro.html#[count]">[count]</A> characters to the
right. This only works when <A HREF="options.html#'wrap'">'wrap'</A> is off. {not in
Vi}
*<A NAME="zL"></A><B>zL</B>*
<A HREF="#zL">zL</A> Move the <A HREF="starting.html#view">view</A> on the text half a screenwidth to the
right, thus scroll the text half a screenwidth to the
left. This only works when <A HREF="options.html#'wrap'">'wrap'</A> is off. {not in
Vi}
*<A NAME="zH"></A><B>zH</B>*
<A HREF="#zH">zH</A> Move the <A HREF="starting.html#view">view</A> on the text half a screenwidth to the
left, thus scroll the text half a screenwidth to the
right. This only works when <A HREF="options.html#'wrap'">'wrap'</A> is off. {not in
Vi}
For the following two commands the cursor is not moved in the text, only the
text scrolls on the screen.
*<A NAME="zs"></A><B>zs</B>*
<A HREF="#zs">zs</A> Scroll the text horizontally to position the cursor
at the start (left side) of the screen. This only
works when <A HREF="options.html#'wrap'">'wrap'</A> is off. {not in Vi}
*<A NAME="ze"></A><B>ze</B>*
<A HREF="#ze">ze</A> Scroll the text horizontally to position the cursor
at the end (right side) of the screen. This only
works when <A HREF="options.html#'wrap'">'wrap'</A> is off. {not in Vi}
==============================================================================
5. Scrolling synchronously *<A NAME="scroll-binding"></A><B>scroll-binding</B>*
Occasionally, <A HREF="motion.html#it">it</A> is desirable to bind two or more <A HREF="windows.html#windows">windows</A> together such that
when one <A HREF="windows.html#window">window</A> is scrolled, the other <A HREF="windows.html#windows">windows</A> are also scrolled. In Vim,
<A HREF="windows.html#windows">windows</A> can be given this behavior by setting the (window-specific)
<A HREF="options.html#'scrollbind'">'scrollbind'</A> option. When a <A HREF="windows.html#window">window</A> that has <A HREF="options.html#'scrollbind'">'scrollbind'</A> set is scrolled, all
other <A HREF="options.html#'scrollbind'">'scrollbind'</A> <A HREF="windows.html#windows">windows</A> are scrolled the same amount, if possible. The
behavior of <A HREF="options.html#'scrollbind'">'scrollbind'</A> can be modified by the <A HREF="options.html#'scrollopt'">'scrollopt'</A> option.
When using the scrollbars, the binding only happens when <A HREF="#scrolling">scrolling</A> the <A HREF="windows.html#window">window</A>
with focus (where the cursor is). You can use this to avoid <A HREF="#scroll-binding">scroll-binding</A>
for a moment without resetting <A HREF="options.html#options">options</A>.
When a <A HREF="windows.html#window">window</A> also has the <A HREF="options.html#'diff'">'diff'</A> option set, the <A HREF="#scroll-binding">scroll-binding</A> uses the
differences between the two <A HREF="windows.html#buffers">buffers</A> to synchronize the position precisely.
Otherwise the following method is used.
*<A NAME="scrollbind-relative"></A><B>scrollbind-relative</B>*
Each <A HREF="options.html#'scrollbind'">'scrollbind'</A> <A HREF="windows.html#window">window</A> keeps track of its "relative offset," which can be
thought of <A HREF="motion.html#as">as</A> the difference between the current window's vertical scroll
position and the other window's vertical scroll position. When one of the
<A HREF="options.html#'scrollbind'">'scrollbind'</A> <A HREF="windows.html#windows">windows</A> is asked to vertically scroll past the beginning or end
limit of its text, the <A HREF="windows.html#window">window</A> no longer scrolls, but remembers how far past
the limit <A HREF="motion.html#it">it</A> wishes to be. The <A HREF="windows.html#window">window</A> keeps this information so that <A HREF="motion.html#it">it</A> can
maintain the same relative offset, regardless of its being asked to scroll
past its buffer's <A HREF="vi_diff.html#limits">limits</A>.
However, if a <A HREF="options.html#'scrollbind'">'scrollbind'</A> <A HREF="windows.html#window">window</A> that has a relative offset that is past its
buffer's <A HREF="vi_diff.html#limits">limits</A> is given the cursor focus, the other <A HREF="options.html#'scrollbind'">'scrollbind'</A> <A HREF="windows.html#windows">windows</A> must
jump to a location where the current window's relative offset is valid. This
behavior can be changed by clearing the 'jump' flag from the <A HREF="options.html#'scrollopt'">'scrollopt'</A>
option.
*<A NAME="syncbind"></A><B>syncbind</B>* *<A NAME=":syncbind"></A><B>:syncbind</B>* *<A NAME=":sync"></A><B>:sync</B>*
<A HREF="#:syncbind">:syncbind</A> Force all <A HREF="options.html#'scrollbind'">'scrollbind'</A> <A HREF="windows.html#windows">windows</A> to have the same
relative offset. I.e., when any of the <A HREF="options.html#'scrollbind'">'scrollbind'</A>
<A HREF="windows.html#windows">windows</A> is scrolled to the top of its buffer, all of
the <A HREF="options.html#'scrollbind'">'scrollbind'</A> <A HREF="windows.html#windows">windows</A> will also be at the top of
their <A HREF="windows.html#buffers">buffers</A>.
*<A NAME="scrollbind-quickadj"></A><B>scrollbind-quickadj</B>*
The <A HREF="options.html#'scrollbind'">'scrollbind'</A> flag is meaningful when using keyboard commands to vertically
scroll a <A HREF="windows.html#window">window</A>, and also meaningful when using the vertical scrollbar of the
<A HREF="windows.html#window">window</A> which has the cursor focus. However, when using the vertical scrollbar
of a <A HREF="windows.html#window">window</A> which doesn't have the cursor focus, <A HREF="options.html#'scrollbind'">'scrollbind'</A> is ignored.
This allows quick adjustment of the relative offset of <A HREF="options.html#'scrollbind'">'scrollbind'</A> <A HREF="windows.html#windows">windows</A>.
==============================================================================
6. Scrolling with a mouse wheel *<A NAME="scroll-mouse-wheel"></A><B>scroll-mouse-wheel</B>*
When your mouse has a scroll wheel, <A HREF="motion.html#it">it</A> should work with Vim in the <A HREF="gui.html#GUI">GUI</A>. How
<A HREF="motion.html#it">it</A> works depends on your system. It might also work in an xterm
|<A HREF="#xterm-mouse-wheel">xterm-mouse-wheel</A>|. By default only vertical scroll wheels are supported,
but some GUIs also support horizontal scroll wheels.
For the <A HREF="os_win32.html#Win32">Win32</A> <A HREF="gui.html#GUI">GUI</A> the scroll action is hard coded. It works just like
dragging the scrollbar of the current <A HREF="windows.html#window">window</A>. How many lines are scrolled
depends on your mouse driver. If the scroll action causes input focus
problems, see |<A HREF="gui_w32.html#intellimouse-wheel-problems">intellimouse-wheel-problems</A>|.
For the <A HREF="options.html#X11">X11</A> GUIs (Motif, <A HREF="gui_x11.html#Athena">Athena</A> and <A HREF="gui_x11.html#GTK">GTK</A>) <A HREF="#scrolling">scrolling</A> the wheel generates key
presses <A HREF="#<ScrollWheelUp>"><ScrollWheelUp></A>, <A HREF="#<ScrollWheelDown>"><ScrollWheelDown></A>, <A HREF="#<ScrollWheelLeft>"><ScrollWheelLeft></A> and
<A HREF="#<ScrollWheelRight>"><ScrollWheelRight></A>. For example, if you push the scroll wheel upwards a
<A HREF="#<ScrollWheelUp>"><ScrollWheelUp></A> key press is generated causing the <A HREF="windows.html#window">window</A> to scroll upwards
(while the text is actually moving downwards). The default action for these
keys are:
<A HREF="#<ScrollWheelUp>"><ScrollWheelUp></A> scroll three lines up *<A NAME="<ScrollWheelUp>"></A><B><ScrollWheelUp></B>*
<A HREF="#<S-ScrollWheelUp>"><S-ScrollWheelUp></A> scroll one page up *<A NAME="<S-ScrollWheelUp>"></A><B><S-ScrollWheelUp></B>*
<A HREF="#<C-ScrollWheelUp>"><C-ScrollWheelUp></A> scroll one page up *<A NAME="<C-ScrollWheelUp>"></A><B><C-ScrollWheelUp></B>*
<A HREF="#<ScrollWheelDown>"><ScrollWheelDown></A> scroll three lines down *<A NAME="<ScrollWheelDown>"></A><B><ScrollWheelDown></B>*
<A HREF="#<S-ScrollWheelDown>"><S-ScrollWheelDown></A> scroll one page down *<A NAME="<S-ScrollWheelDown>"></A><B><S-ScrollWheelDown></B>*
<A HREF="#<C-ScrollWheelDown>"><C-ScrollWheelDown></A> scroll one page down *<A NAME="<C-ScrollWheelDown>"></A><B><C-ScrollWheelDown></B>*
<A HREF="#<ScrollWheelLeft>"><ScrollWheelLeft></A> scroll six columns left *<A NAME="<ScrollWheelLeft>"></A><B><ScrollWheelLeft></B>*
<A HREF="#<S-ScrollWheelLeft>"><S-ScrollWheelLeft></A> scroll one page left *<A NAME="<S-ScrollWheelLeft>"></A><B><S-ScrollWheelLeft></B>*
<A HREF="#<C-ScrollWheelLeft>"><C-ScrollWheelLeft></A> scroll one page left *<A NAME="<C-ScrollWheelLeft>"></A><B><C-ScrollWheelLeft></B>*
<A HREF="#<ScrollWheelRight>"><ScrollWheelRight></A> scroll six columns right *<A NAME="<ScrollWheelRight>"></A><B><ScrollWheelRight></B>*
<A HREF="#<S-ScrollWheelRight>"><S-ScrollWheelRight></A> scroll one page right *<A NAME="<S-ScrollWheelRight>"></A><B><S-ScrollWheelRight></B>*
<A HREF="#<C-ScrollWheelRight>"><C-ScrollWheelRight></A> scroll one page right *<A NAME="<C-ScrollWheelRight>"></A><B><C-ScrollWheelRight></B>*
This should work in all modes, except when editing the command line.
Note that horizontal <A HREF="#scrolling">scrolling</A> only works if <A HREF="options.html#'nowrap'">'nowrap'</A> is set. Also, unless
the "<A HREF="motion.html#h">h</A>" flag in <A HREF="options.html#'guioptions'">'guioptions'</A> is set, the cursor moves to the longest visible
line if the cursor line is about to be scrolled off the screen (similarly to
how the horizontal scrollbar works).
You can modify the default behavior by <A HREF="map.html#mapping">mapping</A> the keys. For example, to make
the scroll wheel move one line or half a page in <A HREF="intro.html#Normal">Normal</A> mode:
<B> :map <ScrollWheelUp> <C-Y></B>
<B> :map <S-ScrollWheelUp> <C-U></B>
<B> :map <ScrollWheelDown> <C-E></B>
<B> :map <S-ScrollWheelDown> <C-D></B>
You can also use Alt and Ctrl modifiers.
This only works when Vim gets the scroll wheel events, of course. You can
check if this works with the "xev" program.
When using XFree86, the /etc/XF86Config file should have the correct entry for
your mouse. For FreeBSD, this entry works for a Logitech scrollmouse:
<B> Protocol "MouseMan"</B>
<B> Device "/dev/psm0"</B>
<B> ZAxisMapping 4 5</B>
See the XFree86 documentation for information.
*<A NAME="<MouseDown>"></A><B><MouseDown></B>* *<A NAME="<MouseUp>"></A><B><MouseUp></B>*
The keys <A HREF="#<MouseDown>"><MouseDown></A> and <A HREF="#<MouseUp>"><MouseUp></A> have been deprecated. Use <A HREF="#<ScrollWheelUp>"><ScrollWheelUp></A>
instead of <A HREF="#<MouseDown>"><MouseDown></A> and use <A HREF="#<ScrollWheelDown>"><ScrollWheelDown></A> instead of <A HREF="#<MouseUp>"><MouseUp></A>.
*<A NAME="xterm-mouse-wheel"></A><B>xterm-mouse-wheel</B>*
To use the mouse wheel in a new xterm you only have to make the scroll wheel
work in your Xserver, <A HREF="motion.html#as">as</A> mentioned above.
To use the mouse wheel in an older xterm you must <A HREF="diff.html#do">do</A> this:
1. Make <A HREF="motion.html#it">it</A> work in your Xserver, <A HREF="motion.html#as">as</A> mentioned above.
2. Add translations for the xterm, so that the xterm will pass a scroll event
to Vim <A HREF="motion.html#as">as</A> an <A HREF="intro.html#escape">escape</A> sequence.
3. Add mappings in Vim, to interpret the <A HREF="intro.html#escape">escape</A> sequences <A HREF="motion.html#as">as</A> <A HREF="#<ScrollWheelDown>"><ScrollWheelDown></A>
or <A HREF="#<ScrollWheelUp>"><ScrollWheelUp></A> keys.
You can <A HREF="diff.html#do">do</A> the translations by adding this to your ~.Xdefaults file (or other
file where your X resources are kept):
<B> XTerm*VT100.Translations: #override \n\</B>
<B> s<Btn4Down>: string("0x9b") string("[64~") \n\</B>
<B> s<Btn5Down>: string("0x9b") string("[65~") \n\</B>
<B> <Btn4Down>: string("0x9b") string("[62~") \n\</B>
<B> <Btn5Down>: string("0x9b") string("[63~") \n\</B>
<B> <Btn4Up>: \n\</B>
<B> <Btn5Up>:</B>
Add these mappings to your <A HREF="starting.html#vimrc">vimrc</A> file:
<B> :map <M-Esc>[62~ <ScrollWheelUp></B>
<B> :map! <M-Esc>[62~ <ScrollWheelUp></B>
<B> :map <M-Esc>[63~ <ScrollWheelDown></B>
<B> :map! <M-Esc>[63~ <ScrollWheelDown></B>
<B> :map <M-Esc>[64~ <S-ScrollWheelUp></B>
<B> :map! <M-Esc>[64~ <S-ScrollWheelUp></B>
<B> :map <M-Esc>[65~ <S-ScrollWheelDown></B>
<B> :map! <M-Esc>[65~ <S-ScrollWheelDown></B>
<A HREF="#top">top</A> - <A HREF="index.html">main help file</A>
</PRE>
</BODY>
</HTML>
|