404

[ Avaa Bypassed ]




Upload:

Command:

botdev@18.117.70.50: ~ $
*scroll.txt*    For Vim version 8.0.  Last change: 2016 Nov 10


		  VIM REFERENCE MANUAL    by Bram Moolenaar


Scrolling						*scrolling*

These commands move the contents of the window.  If the cursor position is
moved off of the window, the cursor is moved onto the window (with
'scrolloff' screen lines around it).  A page is the number of lines in the
window minus two.  The mnemonics for these commands may be a bit confusing.
Remember that the commands refer to moving the window (the part of the buffer
that you see) upwards or downwards in the buffer.  When the window moves
upwards in the buffer, the text in the window moves downwards on your screen.

See section |03.7| of the user manual for an introduction.

1. Scrolling downwards		|scroll-down|
2. Scrolling upwards		|scroll-up|
3. Scrolling relative to cursor	|scroll-cursor|
4. Scrolling horizontally	|scroll-horizontal|
5. Scrolling synchronously	|scroll-binding|
6. Scrolling with a mouse wheel |scroll-mouse-wheel|

==============================================================================
1. Scrolling downwards					*scroll-down*

The following commands move the edit window (the part of the buffer that you
see) downwards (this means that more lines downwards in the text buffer can be
seen):

							*CTRL-E*
CTRL-E			Scroll window [count] lines downwards in the buffer.
			Mnemonic: Extra lines.

							*CTRL-D*
CTRL-D			Scroll window Downwards in the buffer.  The number of
			lines comes from the 'scroll' option (default: half a
			screen).  If [count] given, first set 'scroll' option
			to [count].  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 'startofline' option.
			{difference from vi: Vim scrolls 'scroll' screen
			lines, instead of file lines; makes a difference when
			lines wrap}

<S-Down>	or				*<S-Down>* *<kPageDown>*
<PageDown>	or				*<PageDown>* *CTRL-F*
CTRL-F			Scroll window [count] pages Forwards (downwards) in
			the buffer.  See also 'startofline' option.
			When there is only one window the 'window' option
			might be used.

							*z+*
z+			Without [count]: Redraw with the line just below the
			window at the top of the window.  Put the cursor in
			that line, at the first non-blank in the line.
			With [count]: just like "z<CR>".

==============================================================================
2. Scrolling upwards					*scroll-up*

The following commands move the edit window (the part of the buffer that you
see) upwards (this means that more lines upwards in the text buffer can be
seen):

							*CTRL-Y*
CTRL-Y			Scroll window [count] lines upwards in the buffer.
			Note: When using the MS-Windows key bindings CTRL-Y is
			remapped to redo.

							*CTRL-U*
CTRL-U			Scroll window Upwards in the buffer.  The number of
			lines comes from the 'scroll' option (default: half a
			screen).  If [count] given, first set the 'scroll'
			option to [count].  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 'startofline' option.
			{difference from vi: Vim scrolls 'scroll' screen
			lines, instead of file lines; makes a difference when
			lines wrap}

<S-Up>		or					*<S-Up>* *<kPageUp>*
<PageUp>	or					*<PageUp>* *CTRL-B*
CTRL-B			Scroll window [count] pages Backwards (upwards) in the
			buffer.  See also 'startofline' option.
			When there is only one window the 'window' option
			might be used.

							*z^*
z^			Without [count]: Redraw with the line just above the
			window at the bottom of the window.  Put the cursor in
			that line, at the first non-blank in the line.
			With [count]: First scroll the text to put the [count]
			line at the bottom of the window, then redraw with the
			line which is now at the top of the window at the
			bottom of the window.  Put the cursor in that line, at
			the first non-blank in the line.

==============================================================================
3. Scrolling relative to cursor				*scroll-cursor*

The following commands reposition the edit window (the part of the buffer that
you see) while keeping the cursor on the same line.  Note that the 'scrolloff'
option may cause context lines to show above and below the cursor.

							*z<CR>*
z<CR>			Redraw, line [count] at top of window (default
			cursor line).  Put cursor at first non-blank in the
			line.

							*zt*
zt			Like "z<CR>", but leave the cursor in the same
			column.  {not in Vi}

							*zN<CR>*
z{height}<CR>		Redraw, make window {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.

							*z.*
z.			Redraw, line [count] at center of window (default
			cursor line).  Put cursor at first non-blank in the
			line.

							*zz*
zz			Like "z.", but leave the cursor in the same column.
			Careful: If caps-lock is on, this command becomes
			"ZZ": write buffer and exit!  {not in Vi}

							*z-*
z-			Redraw, line [count] at bottom of window (default
			cursor line).  Put cursor at first non-blank in the
			line.

							*zb*
zb			Like "z-", but leave the cursor in the same column.
			{not in Vi}

==============================================================================
4. Scrolling horizontally				*scroll-horizontal*

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 'sidescroll' is
not used.

z<Right>    or						*zl* *z<Right>*
zl			Move the view on the text [count] characters to the
			right, thus scroll the text [count] characters to the
			left.  This only works when 'wrap' is off.  {not in
			Vi}

z<Left>      or						*zh* *z<Left>*
zh			Move the view on the text [count] characters to the
			left, thus scroll the text [count] characters to the
			right.  This only works when 'wrap' is off.  {not in
			Vi}

							*zL*
zL			Move the view on the text half a screenwidth to the
			right, thus scroll the text half a screenwidth to the
			left.  This only works when 'wrap' is off.  {not in
			Vi}

							*zH*
zH			Move the view on the text half a screenwidth to the
			left, thus scroll the text half a screenwidth to the
			right.  This only works when 'wrap' 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.

							*zs*
zs			Scroll the text horizontally to position the cursor
			at the start (left side) of the screen.  This only
			works when 'wrap' is off.  {not in Vi}

							*ze*
ze			Scroll the text horizontally to position the cursor
			at the end (right side) of the screen.  This only
			works when 'wrap' is off.  {not in Vi}

==============================================================================
5. Scrolling synchronously				*scroll-binding*

Occasionally, it is desirable to bind two or more windows together such that
when one window is scrolled, the other windows are also scrolled.  In Vim,
windows can be given this behavior by setting the (window-specific)
'scrollbind' option.  When a window that has 'scrollbind' set is scrolled, all
other 'scrollbind' windows are scrolled the same amount, if possible.  The
behavior of 'scrollbind' can be modified by the 'scrollopt' option.

When using the scrollbars, the binding only happens when scrolling the window
with focus (where the cursor is).  You can use this to avoid scroll-binding
for a moment without resetting options.

When a window also has the 'diff' option set, the scroll-binding uses the
differences between the two buffers to synchronize the position precisely.
Otherwise the following method is used.

							*scrollbind-relative*
Each 'scrollbind' window keeps track of its "relative offset," which can be
thought of as the difference between the current window's vertical scroll
position and the other window's vertical scroll position.  When one of the
'scrollbind' windows is asked to vertically scroll past the beginning or end
limit of its text, the window no longer scrolls, but remembers how far past
the limit it wishes to be.  The window keeps this information so that it can
maintain the same relative offset, regardless of its being asked to scroll
past its buffer's limits.

However, if a 'scrollbind' window that has a relative offset that is past its
buffer's limits is given the cursor focus, the other 'scrollbind' windows 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 'scrollopt'
option.

						*syncbind* *:syncbind* *:sync*
:syncbind		Force all 'scrollbind' windows to have the same
			relative offset.  I.e., when any of the 'scrollbind'
			windows is scrolled to the top of its buffer, all of
			the 'scrollbind' windows will also be at the top of
			their buffers.

							*scrollbind-quickadj*
The 'scrollbind' flag is meaningful when using keyboard commands to vertically
scroll a window, and also meaningful when using the vertical scrollbar of the
window which has the cursor focus.  However, when using the vertical scrollbar
of a window which doesn't have the cursor focus, 'scrollbind' is ignored.
This allows quick adjustment of the relative offset of 'scrollbind' windows.

==============================================================================
6. Scrolling with a mouse wheel				*scroll-mouse-wheel*

When your mouse has a scroll wheel, it should work with Vim in the GUI.  How
it works depends on your system.  It might also work in an xterm
|xterm-mouse-wheel|.  By default only vertical scroll wheels are supported,
but some GUIs also support horizontal scroll wheels.

For the Win32 GUI the scroll action is hard coded.  It works just like
dragging the scrollbar of the current window.  How many lines are scrolled
depends on your mouse driver.  If the scroll action causes input focus
problems, see |intellimouse-wheel-problems|.

For the X11 GUIs (Motif, Athena and GTK) scrolling the wheel generates key
presses <ScrollWheelUp>, <ScrollWheelDown>, <ScrollWheelLeft> and
<ScrollWheelRight>.  For example, if you push the scroll wheel upwards a
<ScrollWheelUp> key press is generated causing the window to scroll upwards
(while the text is actually moving downwards).  The default action for these
keys are:
    <ScrollWheelUp>	    scroll three lines up	*<ScrollWheelUp>*
    <S-ScrollWheelUp>	    scroll one page up		*<S-ScrollWheelUp>*
    <C-ScrollWheelUp>	    scroll one page up		*<C-ScrollWheelUp>*
    <ScrollWheelDown>	    scroll three lines down	*<ScrollWheelDown>*
    <S-ScrollWheelDown>	    scroll one page down	*<S-ScrollWheelDown>*
    <C-ScrollWheelDown>	    scroll one page down	*<C-ScrollWheelDown>*
    <ScrollWheelLeft>	    scroll six columns left	*<ScrollWheelLeft>*
    <S-ScrollWheelLeft>	    scroll one page left	*<S-ScrollWheelLeft>*
    <C-ScrollWheelLeft>	    scroll one page left	*<C-ScrollWheelLeft>*
    <ScrollWheelRight>	    scroll six columns right	*<ScrollWheelRight>*
    <S-ScrollWheelRight>    scroll one page right	*<S-ScrollWheelRight>*
    <C-ScrollWheelRight>    scroll one page right	*<C-ScrollWheelRight>*
This should work in all modes, except when editing the command line.

Note that horizontal scrolling only works if 'nowrap' is set.  Also, unless
the "h" flag in 'guioptions' 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 mapping the keys.  For example, to make
the scroll wheel move one line or half a page in Normal mode: >
   :map <ScrollWheelUp> <C-Y>
   :map <S-ScrollWheelUp> <C-U>
   :map <ScrollWheelDown> <C-E>
   :map <S-ScrollWheelDown> <C-D>
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: >
    Protocol     "MouseMan"
    Device       "/dev/psm0"
    ZAxisMapping 4 5
See the XFree86 documentation for information.

						*<MouseDown>* *<MouseUp>*
The keys <MouseDown> and <MouseUp> have been deprecated.  Use <ScrollWheelUp>
instead of <MouseDown> and use <ScrollWheelDown> instead of <MouseUp>.

							*xterm-mouse-wheel*
To use the mouse wheel in a new xterm you only have to make the scroll wheel
work in your Xserver, as mentioned above.

To use the mouse wheel in an older xterm you must do this:
1. Make it work in your Xserver, as mentioned above.
2. Add translations for the xterm, so that the xterm will pass a scroll event
   to Vim as an escape sequence.
3. Add mappings in Vim, to interpret the escape sequences as <ScrollWheelDown>
   or <ScrollWheelUp> keys.

You can do the translations by adding this to your ~.Xdefaults file (or other
file where your X resources are kept): >

  XTerm*VT100.Translations:		#override \n\
		s<Btn4Down>: string("0x9b") string("[64~") \n\
		s<Btn5Down>: string("0x9b") string("[65~") \n\
		<Btn4Down>: string("0x9b") string("[62~") \n\
		<Btn5Down>: string("0x9b") string("[63~") \n\
		<Btn4Up>: \n\
		<Btn5Up>:

Add these mappings to your vimrc file: >
	:map <M-Esc>[62~ <ScrollWheelUp>
	:map! <M-Esc>[62~ <ScrollWheelUp>
	:map <M-Esc>[63~ <ScrollWheelDown>
	:map! <M-Esc>[63~ <ScrollWheelDown>
	:map <M-Esc>[64~ <S-ScrollWheelUp>
	:map! <M-Esc>[64~ <S-ScrollWheelUp>
	:map <M-Esc>[65~ <S-ScrollWheelDown>
	:map! <M-Esc>[65~ <S-ScrollWheelDown>
<
 vim:tw=78:ts=8:ft=help:norl:

Filemanager

Name Type Size Permission Actions
README.Debian File 324 B 0644
arabic.txt File 11.66 KB 0644
autocmd.txt File 61.99 KB 0644
change.txt File 73.07 KB 0644
channel.txt File 30.1 KB 0644
cmdline.txt File 46.17 KB 0644
debug.txt File 7.01 KB 0644
debugger.txt File 5.61 KB 0644
develop.txt File 20.68 KB 0644
diff.txt File 16.14 KB 0644
digraph.txt File 60.67 KB 0644
editing.txt File 71.39 KB 0644
eval.txt File 424.86 KB 0644
farsi.txt File 9.48 KB 0644
filetype.txt File 26.03 KB 0644
fold.txt File 23.14 KB 0644
ft_ada.txt File 17.82 KB 0644
ft_rust.txt File 9.3 KB 0644
ft_sql.txt File 29.97 KB 0644
gui.txt File 44.15 KB 0644
gui_w32.txt File 18.47 KB 0644
gui_x11.txt File 28.79 KB 0644
hangulin.txt File 3.21 KB 0644
hebrew.txt File 5.58 KB 0644
help.txt File 8.38 KB 0644
help.txt.vim-tiny File 1.4 KB 0644
helphelp.txt File 14 KB 0644
howto.txt File 2.84 KB 0644
if_cscop.txt File 18.91 KB 0644
if_lua.txt File 14.3 KB 0644
if_mzsch.txt File 11.55 KB 0644
if_ole.txt File 7.23 KB 0644
if_perl.txt File 10.89 KB 0644
if_pyth.txt File 37.05 KB 0644
if_ruby.txt File 7.68 KB 0644
if_sniff.txt File 266 B 0644
if_tcl.txt File 22.49 KB 0644
indent.txt File 38.48 KB 0644
index.txt File 74.65 KB 0644
insert.txt File 81.03 KB 0644
intro.txt File 38.31 KB 0644
map.txt File 63.11 KB 0644
mbyte.txt File 57.92 KB 0644
message.txt File 30.46 KB 0644
mlang.txt File 7.67 KB 0644
motion.txt File 50.39 KB 0644
netbeans.txt File 36.13 KB 0644
options.txt File 376.06 KB 0644
os_390.txt File 4.64 KB 0644
os_amiga.txt File 5.33 KB 0644
os_beos.txt File 10.73 KB 0644
os_dos.txt File 11.74 KB 0644
os_mac.txt File 6.69 KB 0644
os_mint.txt File 1.37 KB 0644
os_msdos.txt File 518 B 0644
os_os2.txt File 294 B 0644
os_qnx.txt File 3.98 KB 0644
os_risc.txt File 323 B 0644
os_unix.txt File 2.53 KB 0644
os_vms.txt File 31.35 KB 0644
os_win32.txt File 13.04 KB 0644
pattern.txt File 57.84 KB 0644
pi_getscript.txt File 20.58 KB 0644
pi_gzip.txt File 1.29 KB 0644
pi_logipat.txt File 4.09 KB 0644
pi_netrw.txt File 171.44 KB 0644
pi_paren.txt File 2.22 KB 0644
pi_spec.txt File 4.03 KB 0644
pi_tar.txt File 6.5 KB 0644
pi_vimball.txt File 11.58 KB 0644
pi_zip.txt File 6.87 KB 0644
print.txt File 30.43 KB 0644
quickfix.txt File 67.77 KB 0644
quickref.txt File 69.45 KB 0644
quotes.txt File 12.44 KB 0644
recover.txt File 10.44 KB 0644
remote.txt File 8.22 KB 0644
repeat.txt File 38.03 KB 0644
rileft.txt File 4.86 KB 0644
russian.txt File 3.02 KB 0644
scroll.txt File 13.74 KB 0644
sign.txt File 6.73 KB 0644
spell.txt File 61.28 KB 0644
sponsor.txt File 7.03 KB 0644
starting.txt File 71.82 KB 0644
syntax.txt File 212.47 KB 0644
tabpage.txt File 16.39 KB 0644
tags File 318.76 KB 0644
tags.vim-tiny File 30 B 0644
tagsrch.txt File 35.78 KB 0644
term.txt File 44.35 KB 0644
terminal.txt File 20.72 KB 0644
tips.txt File 20.07 KB 0644
todo.txt File 289.06 KB 0644
uganda.txt File 13.7 KB 0644
undo.txt File 16.15 KB 0644
usr_01.txt File 6.92 KB 0644
usr_02.txt File 23.77 KB 0644
usr_03.txt File 23.05 KB 0644
usr_04.txt File 18.63 KB 0644
usr_05.txt File 23.02 KB 0644
usr_06.txt File 9.36 KB 0644
usr_07.txt File 15.61 KB 0644
usr_08.txt File 18.92 KB 0644
usr_09.txt File 11.18 KB 0644
usr_10.txt File 28.5 KB 0644
usr_11.txt File 12.32 KB 0644
usr_12.txt File 13.11 KB 0644
usr_20.txt File 13.38 KB 0644
usr_21.txt File 17.94 KB 0644
usr_22.txt File 13.96 KB 0644
usr_23.txt File 12.29 KB 0644
usr_24.txt File 20.36 KB 0644
usr_25.txt File 18.67 KB 0644
usr_26.txt File 8.06 KB 0644
usr_27.txt File 17.31 KB 0644
usr_28.txt File 15.64 KB 0644
usr_29.txt File 19.64 KB 0644
usr_30.txt File 22.13 KB 0644
usr_31.txt File 10.15 KB 0644
usr_32.txt File 5.25 KB 0644
usr_40.txt File 22.64 KB 0644
usr_41.txt File 86.93 KB 0644
usr_42.txt File 13.47 KB 0644
usr_43.txt File 7.23 KB 0644
usr_44.txt File 28.53 KB 0644
usr_45.txt File 17.49 KB 0644
usr_90.txt File 17.25 KB 0644
usr_toc.txt File 9 KB 0644
various.txt File 27.88 KB 0644
version4.txt File 13.58 KB 0644
version5.txt File 301.31 KB 0644
version6.txt File 563.52 KB 0644
version7.txt File 658.95 KB 0644
version8.txt File 668.21 KB 0644
vi_diff.txt File 41.81 KB 0644
vim2html.pl File 4.41 KB 0755
visual.txt File 21.33 KB 0644
windows.txt File 51.87 KB 0644
workshop.txt File 4.52 KB 0644