home *** CD-ROM | disk | FTP | other *** search
/ ftp.muug.mb.ca / 2014.06.ftp.muug.mb.ca.tar / ftp.muug.mb.ca / pub / muuglines / source / vi-help / vi.help < prev    next >
Text File  |  1994-01-22  |  3KB  |  48 lines

  1. PREPEND BY n TO REPEAT n TIMES. TYPE <ESC> TO RETURN FROM INPUT TO COMMAND MODE!
  2. a [A]  append after cursor [line]     w [W]  word ["Word"]
  3. b [B]  back one word ["Word"]         x [X]  cross out char at [before] cursor
  4. c [C]  change next [to end of line]   y [Y]  yank next [whole line]
  5. d [D]  delete next [to end of line]   zpos   redraw zone at pos (.,-, or CR)
  6. e [E]  end of word ["Word"]           ZZ     write changes to file, exit 'vi'
  7. f [F]  find next [previous] in line   ^b[^f] backward [forward] paging
  8. G [nG] go to last [n:th] line in file ^d[^u] downward [upward] scrolling 
  9. h [l]  cursor left [right]            ^d[^t] delete [tab] one sw during insert
  10. H [L]  to home [last] line on screen  ^e[^y] expose 1 more line at bottom [top]
  11. i [I]  insert before cursor [line]    ^h[^w] erase char [word] during insert
  12. j [k]  cursor down [up]               ~      change case (upper/lower) of char 
  13. J      join line with next line       + [-]  to first char in next [prev] line
  14. mx[`x] mark [return to] position 'x'  0 [$]  to first [last] character in line
  15. M [n|] to middle line [n:th column]   ; [,]  repeat [reverse] last f,F,t, or T
  16. n [N]  to next [previous] occurrence  .      repeat last change of the text
  17. o [O]  open a line below [above]      <<[>>] shift line one sw left [right]
  18. p [P]  put in after [before]          ( [)]  to beginning of [next] sentence
  19. Q      quit 'vi', go to 'ex'          { [}]  to beginning of [next] paragraph
  20. r [R]  replace 1 [all] character[s]   / [?]  search forward [backward]
  21. s [S]  substitute character [line]    ``[''] return to previous position [line]
  22. t [T]  to next [previous] in line     : [:!] execute 'ex' [shell] command
  23. u [U]  undo last change[s in line]    ! [!!] shell command on next [this line]
  24. Type <ESC><ESC> and wait for the beep that says 'vi' is in command mode. Then
  25. a large variety of ':' commands are avilable e.g. the substitute command 's':
  26.  
  27. :s/<pattern>/xx/<CR>             change FIRST <pattern> in CURRENT LINE to 'xx'
  28. :s/<pattern>/xx/g<CR>            change ALL <pattern>s in CURRENT LINE to 'xx'
  29. :%s/<pattern>/xx/g<CR>           change ALL <pattern>s in ALL LINES to 'xx'
  30. :s/\(<pat1>\)\(<pat2>\)/\2xx\1/  change FIRST occurrence of <pat1><pat2> in
  31.                  CURRENT LINE to <pat2>'xx'<pat1>. 
  32. :g/<pat1>/s/<pat2>$/xx/          ONLY in lines containing <pat1> change <pat2>
  33.                                  to 'xx' ONLY AT THE END OF THE LINE.
  34. :.,+ns/^./xx/                    change in CURRENT and FOLLOWING n lines ANY
  35.                                  character at the BEGINNING of the line to 'xx'
  36. :%s/<pattern>/xx&yy/g            change ALL <pattern>s in ALL lines to the
  37.                  combination 'xx'<pattern>'yy'
  38. :3s/<pattern>/\U&                change 1ST <pattern> in 3RD LINE to <PATTERN>
  39.  
  40.     <pattern>  means
  41.     xx         the string 'xx' 
  42.     [xy]xx     the string 'xx' OR the string 'yx'
  43.     [^y]xx     the string 'zxx' where 'z' is any character EXCEPT 'y'
  44.     x*         the strings '', 'x', 'xx', 'xxx', ... 
  45. Type 'u' to undo and '&' to repeat a substitution.
  46.  
  47. @(#)vi.help 1.1 88/01/25.  Bo Thide', Swedish Institute of Space Physics.
  48.