home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / vim53os2.zip / vim-5.3 / doc / scroll.txt < prev    next >
Text File  |  1998-08-30  |  6KB  |  151 lines

  1. *scroll.txt*    For Vim version 5.3.  Last modification: 1997 Apr 1
  2.  
  3.  
  4.           VIM REFERENCE MANUAL    by Bram Moolenaar
  5.  
  6.  
  7. Scrolling                        *scrolling*
  8.  
  9. These commands move the contents of the window.  If the cursor position is
  10. moved off of the window, the cursor is moved onto the window (with
  11. 'scrolloff' screen lines around it).  A page is the number of lines in the
  12. window minus two.  The mnemonics for these commands may be a bit confusing.
  13. Remember that the commands refer to moving the window (the part of the buffer
  14. that you see) upwards or downwards in the buffer.  When the window moves
  15. upwards in the buffer, the text in the window moves downwards on your screen.
  16.  
  17. 1. Scrolling downwards        |scroll-down|
  18. 2. Scrolling upwards        |scroll-up|
  19. 3. Scrolling relative to cursor    |scroll-cursor|
  20. 4. Scrolling horizontally    |scroll-horizontal|
  21.  
  22. ==============================================================================
  23. 1. Scrolling downwards                    *scroll-down*
  24.  
  25. The following commands move the edit window (the part of the buffer that you
  26. see) downwards (this means that more lines downwards in the text buffer can be
  27. seen):
  28.  
  29.                             *CTRL-E*
  30. CTRL-E            Scroll window [count] lines downwards in the buffer.
  31.             Mnemonic: Extra lines.
  32.  
  33.                             *CTRL-D*
  34. CTRL-D            Scroll window Downwards in the buffer.  The number of
  35.             lines comes from the 'scroll' option (default: half a
  36.             screen).  If [count] given, first set 'scroll' option
  37.             to [count].  The cursor is moved the same number of
  38.             lines down in the file (if possible; when lines wrap
  39.             and when hitting the end of the file there may be a
  40.             difference).  When the cursor is on the last line of
  41.             the buffer nothing happens and a beep is produced.
  42.             See also 'startofline' option.
  43.             {difference from vi: Vim scrolls 'scroll' screen
  44.             lines, instead of file lines; makes a difference when
  45.             lines wrap}
  46.  
  47. <S-Down>    or                *<S-Down>* *<kPageDown>*
  48. <PageDown>    or                *<PageDown>* *CTRL-F*
  49. CTRL-F            Scroll window [count] pages Forwards (downwards) in
  50.             the buffer.  See also 'startofline' option.
  51.  
  52. ==============================================================================
  53. 2. Scrolling upwards                    *scroll-up*
  54.  
  55. The following commands move the edit window (the part of the buffer that you
  56. see) upwards (this means that more lines upwards in the text buffer can be
  57. seen):
  58.  
  59.                             *CTRL-Y*
  60. CTRL-Y            Scroll window [count] lines upwards in the buffer.
  61.  
  62.                             *CTRL-U*
  63. CTRL-U            Scroll window Upwards in the buffer.  The number of
  64.             lines comes from the 'scroll' option (default: half a
  65.             screen).  If [count] given, first set the 'scroll'
  66.             option to [count].  The cursor is moved the same
  67.             number of lines up in the file (if possible; when
  68.             lines wrap and when hitting the end of the file there
  69.             may be a difference).  When the cursor is on the first
  70.             line of the buffer nothing happens and a beep is
  71.             produced.  See also 'startofline' option.
  72.             {difference from vi: Vim scrolls 'scroll' screen
  73.             lines, instead of file lines; makes a difference when
  74.             lines wrap}
  75.  
  76. <S-Up>        or                    *<S-Up>* *<kPageUp>*
  77. <PageUp>    or                    *<PageUp>* *CTRL-B*
  78. CTRL-B            Scroll window [count] pages Backwards (upwards) in the
  79.             buffer.  See also 'startofline' option.
  80.  
  81. ==============================================================================
  82. 3. Scrolling relative to cursor                *scroll-cursor*
  83.  
  84. The following commands reposition the edit window (the part of the buffer that
  85. you see) while keeping the cursor on the same line:
  86.  
  87.                             *z* *z<CR>*
  88. z<CR>            Redraw, line [count] at top of window (default
  89.             cursor line).  Put cursor at first non-blank in the
  90.             line.
  91.  
  92.                             *zt*
  93. zt            Like "z<CR>", but leave the cursor in the same
  94.             column.  {not in Vi}
  95.  
  96.                             *zN<CR>*
  97. z{height}<CR>        Redraw, make window {height} lines tall.  This is
  98.             useful to make the number of lines small when screen
  99.             updating is very slow.  Cannot make the height more
  100.             than the physical screen height.
  101.  
  102.                             *z.*
  103. z.            Redraw, line [count] at center of window (default
  104.             cursor line).  Put cursor at first non-blank in the
  105.             line.
  106.  
  107.                             *zz*
  108. zz            Like "z.", but leave the cursor in the same column.
  109.             Careful: If caps-lock is on, this commands becomes
  110.             "ZZ": write buffer and exit!  {not in Vi}
  111.  
  112.                             *z-*
  113. z-            Redraw, line [count] at bottom of window (default
  114.             cursor line).  Put cursor at first non-blank in the
  115.             line.
  116.  
  117.                             *zb*
  118. zb            Like "z-", but leave the cursor in the same column.
  119.             {not in Vi}
  120.  
  121. ==============================================================================
  122. 4. Scrolling horizontally                *scroll-horizontal*
  123.  
  124. For the following two commands the cursor follows the screen.  If the
  125. character that the cursor is on is moved off the screen, the cursor is moved
  126. to the closest character that is on the screen.  The value of 'sidescroll' is
  127. not used.
  128.  
  129. z<Right>    or                        *zl* *z<Right>*
  130. zl            Scroll the screen [count] characters to the left.
  131.             This only works when 'wrap' is off.  {not in Vi}
  132.  
  133. z<Left>      or                        *zh* *z<Left>*
  134. zh            Scroll the screen [count] characters to the right.
  135.             This only works when 'wrap' is off.  {not in Vi}
  136.  
  137. For the following two commands the cursor is not moved in the text, only the
  138. text scrolls on the screen.
  139.  
  140.                             *zs*
  141. zs            Scroll the screen horizontally to position the cursor
  142.             at the start (left side) of the screen.  This only
  143.             works when 'wrap' is off.  {not in Vi}
  144.  
  145.                             *ze*
  146. ze            Scroll the screen horizontally to position the cursor
  147.             at the end (right side) of the screen.  This only
  148.             works when 'wrap' is off.  {not in Vi}
  149.  
  150.  vim:tw=78:ts=8:sw=8:
  151.