home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 8
/
FreshFishVol8-CD2.bin
/
bbs
/
util
/
vim-3.0.lha
/
Vim
/
doc
/
vim.hlp
< prev
next >
Wrap
Text File
|
1994-08-14
|
31KB
|
572 lines
VIM help file index
RETURN quit help VIM stands for Vi IMproved.
SPACE one page forward Most of VIM was made by Bram Moolenaar.
a go to this index
b one page backward
c left-right and up-down motions q options i-n
d word and text object motions r options p-s
e pattern searches s options s-t
f various motions; using tags t options t-y
g scrolling u undo; shell; quickfix; various
h inserting text; digraphs v command line editing
i insert mode w Ex ranges; Ex special characters
j changing text x editing files
k complex changes y using the file list
l deleting, copying, moving text z writing and quitting
m repeating commands A starting VIM
n key mapping; abbreviations B multi window functions
o option commands, options a-c C buffer list functions
p options d-h
Read "reference.doc" for a more complete explanation.
Left-right motions
N h left (same as CTRL-H, BS and cursor-left key)
N l right (same as SPACE and cursor-right key)
0 to first character in the line
^ to first non-blank character in the line
N $ to the last character in the line (N-1 lines lower)
N | to column N
N f<char> to the Nth occurrence of <char> to the right
N F<char> to the Nth occurrence of <char> to the left
N t<char> till before the Nth occurrence of <char> to the right
N T<char> till before the Nth occurrence of <char> to the left
N ; repeat the last f, F, t or T N times
N , repeat the last f, F, t or T N times in opposite direction
Up-down motions
N k up (same as CTRL-P and cursor-up key)
N j down (same as CTRL-J, CTRL-N, LF and cursor-down key)
N - up, on the first non-blank character
N + down, on the first non-blank char. (same as CTRL-M and CR)
N _ N - 1 lines down, on the first non-blank character
N G goto line N (default last line), on the first non-blank char.
N % goto line N percentage down in the file.
Word motions
N w N words forward
N W N blank-separated words forward
N e forward to the end of the Nth word
N E forward to the end of the Nth blank-separated word
N b N words backward
N B N blank-separated words backward
Text object motions
N ) N sentences forward
N ( N sentences backward
N } N paragraphs forward
N { N paragraphs backward
N ]] N sections forward
N [[ N sections backward
N ][ N sections (starting with a <}>) forward
N [] N sections (starting with a <}>) backward
N [( [{ N times back to unclosed <(> or <{>
N ]) ]} N times forward to unclosed <(> or <{>
Pattern searches
N /{pattern}[/] search forward for the Nth occurrence of {pattern}
N ?{pattern}[?] search backward for the Nth occurrence of {pattern}
N / repeat last search, in the forward direction
N ? repeat last search, in the backward direction
N n repeat last search
N N repeat last search, in opposite direction
N * search forward for the ident under the cursor
N # search backward for the ident under the cursor
special characters in search patterns magic nomagic
matches any single character . \.
matches start of line ^ ^
matches end of line $ $
matches start of word \< \<
matches end of word \> \>
matches a single char from the range [a-z] \[a-z]
matches a single char not in the range [^a-z] \[^a-z]
matches 0 or more of the preceding atom * \*
matches 1 or more of the preceding atom \+ \+
matches 0 or 1 of the preceding atom \= \=
separates two branches \| \|
group a pattern into an atom \(\) \(\)
Various motions
m<a-zA-Z> mark current position with mark <a-zA-Z>
`<a-zA-Z> go to mark <a-zA-Z>
`` go to the position before the last jump
`[ or `] go to the start or end of the previously operated or put text
'<a-zA-Z[]'> same as `, but on the first non-blank in the line
:marks print the active marks
N CTRL-O go to N older position in jump list
N CTRL-I go to N newer position in jump list
:jumps print the jump list
% find the next brace, bracket, comment or #if/#else/#endif in
this line and go to its match
N H go to the Nth line in the window, on the first non-blank
M go to the middle line in the window, on the first non-blank
N L go to the Nth line from the bottom, on the first non-blank
Using tags
:ta[g][!] {tag} Jump to tag {tag}, unless changes have been made
CTRL-] Jump to the tag under cursor, unless changes made
N CTRL-T Jump to N older tag in tag list
:[count]po[p][!] Jump to [count] older tag in tag list
:[count]ta[g][!] Jump to [count] newer tag in tag list
:tags Print tag list
Scrolling
N CTRL-E window N lines downwards (N lines Extra)
N CTRL-D window N lines Downwards (default half a window)
N CTRL-F window N pages Forwards (downwards)
N CTRL-Y window N lines upwards
N CTRL-U window N lines Upwards (default half a window)
N CTRL-B window N pages Backwards (upwards)
z<CR> or zt redraw, current line at top of window
z. or zz redraw, current line at center of window
z- or zb redraw, current line at bottom of window
Inserting text
N a append text after the cursor (N times)
N A append text at the end of the line (N times)
N i insert text before the cursor (N times)
N I insert text before the first non-blank in the line (N times)
N o open a new line below the current line, append text (N times)
N O open a new line above the current line, append text (N times)
Special inserts
:r [file] insert the contents of [file] below the cursor
:r!{command} insert the standard output of {command} below the cursor
Digraphs
:dig[raphs] show current list of digraphs
:dig[raphs] {char1}{char2} {number} ...
add digraph(s) to the list
char action in insert mode
CTRL-[ or <ESC> end insert or replace mode, back to command mode
CTRL-A insert previously inserted text
CTRL-@ insert previously inserted text and stop insert
CTRL-R <0-9a-z%:> insert contents of register <0-9a-z%:>
CTRL-J or <LF> or CTRL-M or <CR> begin new line
CTRL-K {char1} {char2} enter digraph
CTRL-E / CTRL-Y insert the character which is below/above the cursor
CTRL-V insert character literally, or enter decimal byte value
CTRL-N / CTRL-P insert next/previous match of identifier before the cursor
CTRL-H or <BS> or <DEL> delete the character before the cursor
CTRL-W delete word before the cursor
CTRL-U delete all entered characters in the current line
CTRL-T insert one shiftwidth of indent in the current line
CTRL-D delete one shiftwidth of indent in the current line
0 CTRL-D or ^ CTRL-D delete all indent in the current line
{char1} <BS> {char2} enter digraph if 'dg' option set
CTRL-B toggle 'revins' (reverse insert) option
keys that stop insert, do something and get back to insert:
cursor keys move cursor left/right/up/down
shift-up/down one screenfull backward/forward
shift-left/right one word left/right
CTRL-O {command} execute {command}
Chang