home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 5 / FreshFish_July-August1994.bin / bbs / util / vim-2.0.lha / Vim-2.0 / doc / index < prev    next >
Encoding:
Text File  |  1993-12-12  |  20.8 KB  |  600 lines

  1. index of vim commands for
  2.  1. insert mode
  3.  2. VI commands (normal mode)
  4.  3. command line editing
  5.  4. EX commands
  6.  
  7. (for an overview of options see the end of reference.doc)
  8.  
  9. 1. INSERT MODE
  10. ==============
  11.  
  12. char        action
  13. -----------------------------------------------------------------------
  14. ^@        insert previously inserted text and stop insert {vi: up to 128
  15.         chars}
  16. ^A        insert previously inserted text {not in Vi}
  17. ^D        delete one shiftwidth of indent in the current line {vi: 
  18.         only after auto-indent}
  19.         when preceded with <0> or <^>, delete all indent, with <^>
  20.         restore it in the next line
  21. ^E        insert the character which is below the cursor
  22. ^H <BS>        delete character before the cursor {vi: does not cross lines,
  23.         does not delete autoindents}
  24. ^J <LF>        begin new line
  25. ^K {char1} {char2} enter digraph (only when compiled with it) {vi: no digraphs}
  26. ^M <CR>        begin new line
  27. ^O        execute a single command and return to insert mode
  28. ^P        toggle 'revins' option.
  29. ^R <0-9a-z>    insert contents of register <0-9a-z> {not in vi}
  30. ^T        insert one shiftwidth of indent in current line {vi: only in 
  31.         autoindent}
  32. ^U        delete all entered characters in the current line
  33. ^V        insert next non-digit literally, insert three digit decimal 
  34.         number as a single byte.
  35. ^W        delete word before the cursor
  36. ^Y        insert the character which is above the cursor
  37. ^[ <ESC>    end insert mode
  38. <DEL>        same as ^H <BS>
  39. <C_UP>        cursor one line up
  40. <C_DOWN>    cursor one line down
  41. <C_LEFT>    cursor one character left
  42. <C_RIGHT>    cursor one character right
  43. <SC_UP>        one screenfull backward
  44. <SC_DOWN>    one screenfull forward
  45. <SC_LEFT>    cursor one word left
  46. <SC_RIGHT>    cursor one word right
  47. {char1}<BS>{char2} enter digraph (only when compiled with it and 'digraph' 
  48.         option set) {vi: no digraphs}
  49.  
  50.  
  51. 2. VI COMMANDS
  52. ==============
  53.  
  54. CHAR means non-blank char
  55. WORD means sequences of non-blank chars
  56. N is number entered before the command
  57. <move> is a cursor movement command
  58. Nmove is the text that is moved over with a cursor movement command
  59. SECTION is a section that possibly starts with '}' instead of '{'
  60.  
  61. note: 1 = cursor movement command; 2 = can be undone/redone
  62.  
  63. char        note    vim normal mode (vi: what the unix vi does)
  64. ------------------------------------------------------------------------------
  65. ^@            error
  66. ^A        2    add N to number at/after cursor {vi: no ^A}
  67. ^B        1    scroll N screens Backwards
  68. ^C            interrupt current (search) command
  69. ^D            scroll Down N lines (default: half a screen)
  70. ^E            scroll N lines upwards (N lines Extra)
  71. ^F        1    scroll N screens Forward
  72. ^G            display current file name and position
  73. ^H <BS>        1    cursor N chars to the left
  74. ^I <TAB>    1    go to N newer entry in jump list
  75. ^J <LF>        1    cursor N lines downward
  76. ^K            error
  77. ^L            redraw screen
  78. ^M <CR>        1    cursor to the first CHAR N lines lower
  79. ^N        1    cursor N lines downward
  80. ^O        1    go to N older entry in jump list
  81. ^P        1    cursor N lines upward
  82. ^V            start blockwise Visual (vi: no Visual)
  83. ^R        2    redo changes which were undone with 'u' (vi: retype
  84.             the screen)
  85. ^S        2    subtract N from number at/after cursor {vi: no ^S}
  86. ^T            jump to N older Tag in tag list
  87. ^U            scroll N lines Upwards (default: half a screen)
  88. ^V            error
  89. ^W            error
  90. ^X            error
  91. ^Y            scroll N lines downwards
  92. ^Z            suspend program (or start new shell)
  93. ^[ <ESC>        error
  94. ^\            error
  95. ^]            :ta to ident under cursor
  96. ^^            edit Nth alternate file (equivalent to :e #N)
  97. ^_            error
  98.  
  99. <SPACE>        1    cursor N chars to the right
  100. !<move><filter>        filter Nmove text through the "filter" command
  101. !!<filter>        filter N lines through the "filter" command
  102. "<a-zA-Z0-9.>        use buffer <a-zA-Z0-9.> for next delete, yank or put
  103.             (upper case to append)(<.> only works for put)
  104. #        1    search backward for the Nth occurrence of the ident under
  105.             the cursor {not in vi}
  106. $        1    cursor to the end of line N from the cursor
  107. %        1    find the next (curly/square) bracket on this line and go
  108.             to its match. With count: go to N percentage in the file.
  109. &        2    repeat last :s
  110. '<a-zA-Z>    1    cursor to the first CHAR on the line with mark <a-zA-Z>
  111. '[        1    cursor to the first CHAR on the line of the start of 
  112.             last operated text or start of putted text
  113. ']        1    cursor to the first CHAR on the line of the end of 
  114.             last operated text or end of putted text
  115. ''        1    cursor to the first CHAR of the line where the cursor was
  116.             before the latest jump.
  117. (        1    cursor N sentences backward
  118. )        1    cursor N sentences forward
  119. *        1    search forward for the Nth occurrence of the ident under
  120.             the cursor {not in vi}
  121. +        1    cursor to the first CHAR N lines lower
  122. ,        1    repeat latest f, t, F or T in opposite direction N times
  123. -        1    cursor to the first CHAR N lines higher
  124. .        2    repeat last change with count replaced by N
  125. /<pattern>    1    search forward for the Nth occurrence of <pattern>
  126. 0        1    cursor to the first char of the line
  127. 1            prepend to command to give a count
  128. 2            "
  129. 3            "
  130. 4            "
  131. 5            "
  132. 6            "
  133. 7            "
  134. 8            "
  135. 9            "
  136. :            Ex command (see below)        
  137. ;        1    repeat latest f, t, F or T N times
  138. <<move>        2    shift the Nmove lines one shiftwidth leftwards
  139. <<        2    shift N lines one shiftwidth leftwards
  140. =<move>        2    filter Nmove lines through "indent" (vi: when option
  141.             'lisp' is set autoindent Nmove lines)
  142. ==        2    filter N lines through "indent"
  143. ><move>        2    shift Nmove lines one shiftwidth rightwards
  144. >>        2    shift N lines one shiftwidth rightwards
  145. ?<pattern>    1    search backward for the Nth previous occurrence of
  146.             <pattern>
  147. @<a-z>        2    execute the contents of named buffer <a-z> N times
  148. @@        2    repeat the previous @<a-z> N times
  149. A        2    append text at the end of the line N times
  150. B        1    cursor N WORDS backward
  151. <"x>C        2    change from the cursor position to the end of the line,
  152.             and N-1 more lines [into buffer x]; synonym for c$
  153. <"x>D        2    delete the characters under the cursor until the end of
  154.             the line and N-1 more lines [into buffer x]; synonym for d$
  155. E        1    cursor forward to the end of WORD N
  156. F<char>            cursor to the Nth occurrence of <char> to the left
  157. G        1    cursor to line N, default last line
  158. H        1    cursor to line N from top of screen
  159. I        2    insert text before the first CHAR on the line N times
  160. J        2    Join N lines; default is 2
  161. K            lookup Keyword under the cursor with "keywordprg"
  162. L        1    cursor to line N from bottom of screen
  163. M        1    cursor to middle line of screen
  164. N        1    repeat the latest '/' or '?' N times in opposite
  165.             direction
  166. O        2    begin a new line above the cursor and insert text, repeat
  167.             N times (vi: blank N screen lines)
  168. <"x>P        2    put the text [from buffer x] before the cursor N times
  169. V            start Visual mode on lines (vi: go to Ex mode)
  170. R        2    enter replace mode: overtype existing characters, repeat the
  171.             entered text N-1 times
  172. <"x>S        2    delete N lines [into buffer x] and start insert; synonym
  173.             for ^cc or 0cc, depending on autoindent
  174. T<char>        1    cursor till after Nth occurrence of <char> to the left
  175. U        2    undo all latest changes on one line (vi: while not moved
  176.             off of it)
  177.             While in Visual mode: make uppercase
  178. Q<move>        2    Join N lines and re-format them
  179. W        1    cursor N WORDS forward
  180. <"x>X        2    delete N characters before the cursor [into buffer x]
  181. <"x>Y            yank N lines [into buffer x]; synonym for yy
  182. ZZ            store current file, if modified, and exit        
  183. [[        1    cursor N sections backward
  184. []        1    cursor N SECTIONS backward
  185. \            error
  186. ]]        1    cursor N sections forward
  187. ][        1    cursor N SECTIONS forward
  188. ^        1    cursor to the first CHAR of the line
  189. _        1    cursor to the first CHAR N - 1 lines lower
  190. `<a-zA-Z>    1    cursor to the mark <a-zA-Z>
  191. `[        1    cursor to the start of last operated text or start of 
  192.             putted text
  193. `]        1    cursor to the end of last operated text or end of 
  194.             putted text
  195. ``        1    cursor to the position before latest jump
  196. a        2    append text after the cursor N times
  197. b        1    cursor N words backward
  198. <"x>c<move>    2    delete Nmove text [into buffer x] and start insert
  199. <"x>cc        2    delete N lines [into buffer x] and start insert
  200. <"x>d<move>    2    delete Nmove text [into buffer x]
  201. <"x>dd        2    delete N lines [into buffer x]
  202. e        1    cursor forward to the end of word N
  203. f<char>        1    cursor to Nth occurrence of <char> to the right
  204. g            error
  205. h        1    cursor N chars to the left
  206. i        2    insert text before the cursor N times
  207. j        1    cursor N lines downward
  208. k        1    cursor N lines upward
  209. l        1    cursor N chars to the right
  210. m<a-z>            set mark <a-z> at cursor position        
  211. n        1    repeat the latest '/' or '?' N times
  212. o        2    begin a new line below the cursor and insert text, repeat
  213.             N times (vi: blank N screen lines)
  214.             While Visual: cursor moves other end
  215. <"x>p        2    put the text [from buffer x] after the cursor N times
  216. v            start Visual mode with characters (vi: no Visual)
  217. r<char>        2    replace N chars by <char>
  218. <"x>s        2    (substitute) delete N characters [into buffer x] and
  219.             start insert
  220. t<char>        1    cursor till before Nth occurrence of <char> to the right
  221. u        2    undo changes (vi: only one level)
  222.             With Visual: make lowercase (vi: no Visual)
  223. q<a-zA-Z>        record typed characters into named buffer <a-zA-Z>
  224.             (upper case to append)
  225. q            stops recording (vi: no recording)
  226. w        1    cursor N words forward
  227. <"x>x        2    delete N characters under and after the cursor [into
  228.             buffer x]
  229. <"x>y<move>        yank Nmove text [into buffer x]
  230. <"x>yy            yank N lines [into buffer x]
  231. z<CR>            redraw, cursor line to top of window        
  232. z.            redraw, cursor line to center of window
  233. z-            redraw, cursor line at bottom of window
  234. {        1    cursor N paragraphs backward
  235. |        1    cursor to column N
  236. }        1    cursor N paragraphs forward
  237. ~        2    option notildeop: switch case of N characters under
  238.             cursor and move the cursor N characters to the right
  239.             (vi: no count)
  240. ~<move>            option tildeop: switch case of Nmove text (vi: no tildeop
  241.             option)
  242. <DEL>            when entering a number: remove the last digit
  243. <HELP>            show the file vim:vim.hlp page by page (vi: no help)
  244. <C_UP>        1    move cursor N lines upwards
  245. <C_DOWN>    1    move cursor N lines downwards
  246. <C_LEFT>    1    move cursor N chars to the left
  247. <C_RIGHT>    1    move cursor N chars to the right
  248. <SC_UP>        1    scroll N screens Backwards (same as ^B)
  249. <SC_DOWN>    1    scroll N screens Forwards (same as ^F)
  250. <SC_LEFT>    1    cursor N words backward (same as b)
  251. <SC_RIGHT>    1    cursor N words forward (same as w)
  252.  
  253.  
  254. 3. command line editing
  255. =======================
  256.  
  257. Get to the command line with the ':', '!', '/' or '?' commands.
  258. Normal characters are inserted at the current cursor position.
  259. (vi: can only alter last character in the line)
  260.  
  261. ^A        do filename completion on the pattern in front of the cursor
  262.         and insert all matches
  263. ^B        cursor to begin of command line
  264. ^D        list filenames that match the pattern in front of the cursor
  265. ^E        cursor to end of command line
  266. ^H        delete the character in front of the cursor
  267. ^L        do filename completion on the pattern in front of the cursor
  268.         and insert the longest common part
  269. ^N        after an <ESC> with multiple matches: go to next match
  270.         otherwise: same as <C_DOWN>
  271. ^P        after an <ESC> with multiple matches: go to previous match
  272.         otherwise: same as <C_UP>
  273. ^U        remove all characters
  274. ^V        insert next non-digit literally, insert three digit decimal 
  275.         number as a single byte. {Vi: type the CTRL-V twice to get one}
  276. ^W        delete the word in front of the cursor
  277. 'wildchar' option (default <TAB>)
  278.         do filename completion on the pattern in front of the cursor
  279. <DEL>        delete the character under the cursor
  280. <C_UP>        recall previous command line from history
  281. <C_DOWN>    recall next command line from history
  282. <C_LEFT>    cursor left
  283. <C_RIGHT>    cursor right
  284. <SC_LEFT>    cursor one word left
  285. <SC_RIGHT>    cursor one word right
  286. <SC_UP>        recall previous command line that matches pattern in front of
  287.         the cursor
  288. <SC_DOWN>    recall next command line that matches pattern in front of the
  289.         cursor
  290.  
  291.  
  292. 4. EX commands
  293. ==============
  294.  
  295. lines that start with " or # are ignored
  296.  
  297. <range> stands for a series of line specifiers, separated with ',' or ';'.
  298. When separated with ';' the cursor position will be set to that line before
  299. interpreting the next line specifier.
  300. The default line specifier (for most commands) is the Cursor position.
  301. line numbers may be specified with:
  302.     <number>    the absolute line number
  303.     .        the current line
  304.     $        the last line in the file
  305.     %        equal to 1,$ (the entire file)
  306.     't        position of mark t
  307.     /<pattern>    the next line where <pattern> matches
  308.     ?<pattern>    the previous line where <pattern> matches
  309. Each may be followed (several times) by '+' or '-' and an optional number.
  310. This number is added or subtracted from the preceding line number.
  311. if the number is omitted, 1 is used.
  312. Examples:
  313.     .+3        three lines below the cursor
  314.     /that+1        the line below the next line containing "that"
  315.     .,$        from current line until end of file
  316.  
  317. In the commands below the characters in square brackets are optional.
  318.  
  319. :<range>        set the cursor on the (last) specified line number
  320.  
  321. :ab[breviate]        list all abbreviations
  322. :ab[breviate] <lhs>    list abbreviation for <lhs>
  323. :ab[breviate] <lhs> <rhs>
  324.             add <lhs> to the list of abbreviations
  325.  
  326. :a[ppend]        {vi: append text}
  327.  
  328. :ar[gs]            print the file list, with the current file in []
  329.  
  330. :ca[bbrev]        like ":ab", but for command line mode only {not in
  331.             vi}
  332.  
  333. :cc [nr]        Display error [nr] (default is same error)
  334.  
  335. :cd            On non-Unix systems: Print the current directory
  336.             name. {vi: no cd command}
  337. :cd            On Unix systems: Change the current directory to the
  338.             home directory. {vi: no cd command}
  339. :cd <path>        change the current directory to <path>
  340.  
  341. :[range]ce[nter] [width] center lines in [range] between [width] columns
  342.             (default 'textwidth' or 80). {vi: no such command}
  343.  
  344. :cf            read error file (from errorfile option) and jump to
  345.             the first error
  346.  
  347. :c[hange]        {vi: replace lines}
  348.  
  349. :ch[dir]        same as :cd
  350.  
  351. :cm[ap]            like :map, but for command line mode only {not in vi}
  352.  
  353. :cn            display next error
  354.  
  355. :cno[remap]        like :noremap, but for command line mode only {not in vi}
  356.  
  357. :cnorea[bbrev] <lhs> <rhs>
  358.             like ":cab", but no remapping for this <rhs> {not in
  359.             vi}
  360.  
  361. :[range]co[py] {address} copy lines from [range] to {address}
  362.  
  363. :cp            display previous error
  364.  
  365. :cq            Quit without writing and return an error code
  366.  
  367. :cu[nmap]        like :unmap, but for command line mode only {not in vi}
  368.  
  369. :cuna[bbrev]        like ":unab", but for command line mode only {not in
  370.             vi}
  371.  
  372. :[<range>]d[elete] [x] [count]
  373.             delete <range> lines (default: current line)
  374.  
  375. :dig[raphs]        display currently defined digraphs {not in vi}
  376.  
  377. :dig[raphs] {char1}{char2} {number} ...
  378.             define the character pair {char1} {char2} to be the 
  379.             digraph for character {number}. {number} is entered 
  380.             as digits.
  381.  
  382. :di[splay]        display the contents of numbered and named buffers
  383.             {vi: no such command}
  384.  
  385. :e[dit] [file]        edit 'file' (default: current file), unless changes have
  386.             been made {vi: allow +n to start at certain position}
  387. :e[dit]! [file]        edit 'file' (default: current file) always
  388.  
  389. :ex            same as :edit
  390.  
  391. :f[ile]            prints the current file name and some more info
  392. :f[ile] <name>        sets current file name to <name>
  393. :files            lists the alternate file names
  394.  
  395. :<range>g[lobal]/<pattern>/<cmd>
  396.             execute the EX command <cmd> on the lines where <pattern>
  397.             matches
  398. :<range>g[lobal]!/<pattern>/<cmd>
  399.             execute the EX command <cmd> on the lines where <pattern>
  400.             does not match
  401.  
  402. :h[elp]            show the help file page by page {vi: no help}
  403.  
  404. :ia[bbrev]        like ":ab", but for insert mode only {not in vi}
  405.  
  406. :i[nsert]        {vi: insert text}
  407.  
  408. :im[ap]            like :map, but for insert mode only {not in vi}
  409.  
  410. :ino[remap]        like :noremap, but for insert mode only {not in vi}
  411.  
  412. :inorea[bbrev] <lhs> <rhs>
  413.             like ":iab", but no remapping for this <rhs> {not in
  414.             vi}
  415.  
  416. :iuna[bbrev]        like ":unab", but for insert mode only {not in vi}
  417.  
  418. :iu[nmap]        like :unmap, but for insert mode only {not in vi}
  419.  
  420. :<range>j[oin]        join <range> lines
  421.  
  422. :ju[mps]        print jump list {vi: no such command}
  423.  
  424. :[range]k<a-z>        set mark without a space
  425.  
  426. :[range]le[ft] [indent]    left align lines in [range]. Sets the indent in the
  427.             lines to [indent] (default 0). {vi: no such command}
  428.  
  429. :[range]l[ist]        list lines
  430.  
  431. :mak[e] [arguments]    Run the program given with 'makeprg', with optional
  432.             [arguments]. The output is saved in the error file.
  433.             Then the ":cf" command is executed to jump to the
  434.             first error.
  435.  
  436. :map <lhs> <rhs>    map the key sequence <lhs> to <rhs> in normal mode
  437. :map! <lhs> <rhs>    map the key sequence <lhs> to <rhs> in insert mode
  438.  
  439. :[range]ma[rk] <a-z>    set mark
  440.  
  441. :marks            list all marks {vi: no such command}
  442.  
  443. :mk[exrc]        write options to .exrc file
  444. :mkv[imrc]        write options to .vimrc file {not in vi}
  445.  
  446. :[range]m[ove] {address} move lines from [range] to {address}
  447.  
  448. :n[ext]            edit next file, unless changes have been made
  449. :n[ext]!        edit next file
  450. :n[ext] <filelist>    define <filelist> as the new list of files and edit
  451.             the first one, unless changes have been made
  452. :n[ext]! <filelist>    define <filelist> as the new list of files and edit
  453.             the first one {vi: +command to start editing at a
  454.             specified position}
  455.  
  456. :norea[bbrev] <lhs> <rhs>
  457.             like ":ab", but no remapping for this <rhs> {not in
  458.             vi}
  459.  
  460. :nore[map] <lhs> <rhs>    map the key sequence <lhs> to <rhs> in normal mode, 
  461.             disallow remapping of <rhs> {not in vi}
  462. :nore[map]! <lhs> <rhs>    map the key sequence <lhs> to <rhs> in insert mode,
  463.             disallow remapping of <rhs> {not in vi}
  464.  
  465. :nu[mber]        {vi: print specified lines with their line number}
  466.  
  467. :N[ext]            edit previous file in file list, unless changes have
  468.             been made
  469. :N[ext]!        edit previous file in file list
  470.  
  471. :o[pen]            {vi: start editing in open mode}
  472.  
  473. :[count]po[p][!]    jump to [count] older tag in tag list {vi: no such command}
  474.  
  475. :pres[erve]        {vi: emergency exit}
  476.  
  477. :pr[evious]        same as :Next
  478.  
  479. :<range>p[rint]        print the specified lines
  480.  
  481. :pu[t] [x]        insert text from buffer [x] below current line
  482. :pu[t]! [x]        insert text from buffer [x] above current line
  483.  
  484. :pwd            Print the current directory name. {vi: no such command}
  485.  
  486. :q[uit]         quit, unless changes have been made
  487. :q[uit]!        quit always, without writing
  488.  
  489. :r[ead] <name>        insert the file <name> below the cursor
  490. :r[ead]!<cmd>        excute <cmd> and insert its standard output below the
  491.             cursor
  492.  
  493. :rec[over]        {vi: recover a file after a crash or :preserve}
  494.  
  495. :rew[ind]        start editing the first file in the file list, unless
  496.             changes have been made
  497. :rew[ind]!        start editing the first file in the file list
  498.  
  499. :[range]ri[ght] [width] right align lines in [range] at [width] columns
  500.             (default 'textwidth' or 80). {vi: no such command}
  501.  
  502. :se[t]            show all modified options {vi: non-default options}
  503. :se[t] all        show all options
  504. :se[t] <option>        set toggle option on, show value of string or number
  505.             option
  506. :se[t] no<option>    set toggle option off
  507. :se[t] inv<option>    invert toggle option
  508. :se[t] <option>=<value> set string or number option to <value>
  509. :se[t] <option>?    show value of <option>
  510.  
  511. :sh[ell]        escape to a shell {vi: shell name from option 'shell'}
  512.  
  513. :so[urce] <file>    read EX commands from <file>
  514. :so[urce]! <file>    read VI commands from <file> {vi: no such command}
  515.  
  516. :st[op][!]        suspend the editor
  517.  
  518. :<range>s[ubstitute]/<pattern>/<string>/<option>
  519.             for each line in <range> replace the first occurrence of
  520.             <pattern> by <string>; with <option> 'g' all occurrences
  521.             on the line are replaced; with <option> 'c' each
  522.             replace has to be confirmed
  523. :<range>s[ubstitute]    repeat last :substitute
  524.  
  525. :sus[pend][!]        suspend the editor
  526.  
  527. :t            synonym for copy
  528.  
  529. :ta[g] <ident>        search for <indent> in the tags file and execute
  530.             the accompanying command, unless changes have been made
  531. :ta[g]! <ident>        search for <indent> in the tags file and execute
  532.             the accompanying command
  533.  
  534. :[count]ta[g][!]    jump to [count] newer tag in tag list {vi: no such command}
  535.  
  536. :tags            print the tag list {vi: no such command}
  537.  
  538. :una[bbreviate]    <lhs>    remove <lhs> from abbreviation list
  539.  
  540. :u[ndo]            undo last change
  541.  
  542. :unm[ap] <lhs>        remove the mapping of <lhs> for normal mode
  543. :unm[ap]! <lhs>        remove the mapping of <lhs> for insert mode
  544.  
  545. :ve[rsion]        print the version number of the editor
  546.  
  547. :<range>v[global]/<pattern>/<cmd>
  548.             execute the EX command <cmd> on the lines where <pattern>
  549.             does not match
  550.  
  551. :vi[sual]        {vi: switch from EX or open to visual mode}
  552.  
  553. :wi[nsize] <width> <height>
  554.             Set effective window size to <width> columns and <height>
  555.             rows. Does not change actual window size. Should only be
  556.             used from script files. {vi: no such command}
  557.  
  558. :<range>w[rite][!]    write the specified lines to the current file
  559. :<range>w[rite]    <file>    write the specified lines to <file>, unless it
  560.             already exists
  561. :<range>w[rite]! <file>    write the specified lines to <file>
  562. :<range>w[rite][!] >>    append the specified lines to the current file
  563. :<range>w[rite][!] >> <file>
  564.             append the specified lines to <file>
  565. :<range>w[rite] !<cmd>    execute <cmd> with <range> lines as standard input
  566.  
  567. :wq            write the current file and exit if no more files
  568. :wq!            write the current file and exit
  569. :wq <file>        write to <file> and exit if no more files
  570. :wq! <file>        write to <file> and exit
  571.  
  572. :x[it][!] [file]    same as :wq, but write only when changes have been made
  573.  
  574. :y[ank] [x]        copy lines into buffer [x]
  575.  
  576. :z            {vi: print some lines}
  577.  
  578. :@<reg>            execute contents of buffer <reg> as an Ex command 
  579.             {only in some versions of vi}
  580.  
  581. :@@            repeat last :@<reg> command.
  582.  
  583. :![!]<cmd> [!][<arg>]    execute <cmd> with the shell, replace the optional bangs
  584.             with the previously given command, append the optional
  585.             <arg>
  586. :<range>![!]<cmd> [!][<arg>]
  587.             filter <range> lines through <cmd>, replace the optional bangs
  588.             with the previously given command, append the optional
  589.             <arg>
  590.  
  591. :<            shift left
  592.  
  593. :>            shift right
  594.  
  595. :=            print the line number
  596.  
  597. :&            same as :substitute
  598.  
  599. :~            {vi: do a substitute on the previous regular expression}
  600.