home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / vim42os2.zip / vim-4.2 / doc / vim_diff.txt < prev    next >
Text File  |  1996-06-18  |  32KB  |  723 lines

  1. *vim_diff.txt*  For Vim version 4.2.  Last modification: 1996 June 16
  2.  
  3. This is a summary of the differences between VIM and vi. It is not complete.
  4. see also |vim_ref.txt|, look for comments in {}, like "{not in Vi}".
  5.  
  6. Vim is mostly POSIX 1003.2-1 compliant.  The commands known to be missing
  7. are "Q", ":append", ":change", ":insert", ":open" and ":z".  There are
  8. probably a lot of small differences.
  9.  
  10.  
  11. THE MOST INTERESTING ADDITIONS
  12. ==============================
  13.  
  14. Vi compatibility.                    |'compatible'|
  15.     Although Vim is 99% Vi compatible, some things in vi can be
  16.     considered to be a bug, or at least need improvement.  Therefore Vim
  17.     behaves a little bit different here and there by default.  When the
  18.     'compatible' option is set, all options are given a vi-compatible
  19.     value,  Vim will behave like the "real" vi as much as possible.  The
  20.     'cpoptions' option can be used to set vi compatibility on/off for a
  21.     few specific items.                |'cpoptions'|
  22.  
  23. Support for different systems.
  24.     Vim can be used on:
  25.     - All Unix systems (it works on all systems it was tested on).
  26.     - Amiga (500, 1000, 1200, 2000, 3000, 4000, ...).
  27.     - MS-DOS in real-mode (no additional drivers required).
  28.     - In protected mode on Windows 3.1 and MS-DOS (DPMI driver required).
  29.     - Windows 95 and Windows NT, with support for long file names.
  30.     - OS/2 (needs emx.dll)
  31.     - Atari MiNT
  32.     - Macintosh (although there is no binary available, needs some work)
  33.  
  34. Multi level undo.                    |undo|
  35.     'u' goes backward in time, 'ctrl-R' goes forward again.  Set option
  36.     'undolevels' to the number of changes to be remembered (default 1000).
  37.     Set 'undolevels' to 0 for a vi-compatible one level undo. Set it to
  38.     -1 for no undo at all.
  39.  
  40.     When all changes in a buffer have been undone, the buffer is not
  41.     considered changed anymore.  You can exit it with :q, without <!>.
  42.  
  43. Multiple windows and buffers.                |vim_win.txt|
  44.     Vim can split the screen into several windows, each editing a
  45.     different buffer or the same buffer at a different location.  Buffers
  46.     can still be loaded (and changed) but not displayed in a window.  This
  47.     is called a hidden buffer.  Many commands and options have been added
  48.     for this facility.
  49.  
  50. Repeat a series of commands.                |q|
  51.     'q'<c> starts recording typed characters into named register <c>
  52.     (append to the register if register name is upper case).  A subsequent
  53.     'q' stops recording.  The register can then be executed with the
  54.     '@'<c> command.  This is very useful to repeat a complex action.
  55.  
  56. Flexible insert mode.                    |ins_special_special|
  57.     The arrow keys can be used in insert mode to move around in the file.
  58.     This breaks the insert in two parts as far as undo and redo is
  59.     concerned.
  60.  
  61.     CTRL-O can be used to execute a single command-mode command.  This is
  62.     almost the same as hitting <Esc>, typing the command and hitting 'a'.
  63.  
  64. Visual mode.                        |Visual_mode|
  65.     Visual can be used to first highlight a piece of text and then give a
  66.     command to do something with it.  This is an (easy to use) alternative
  67.     to first giving the operator and then moving to the end of the text
  68.     to be operated upon.  'v' and 'V' are used to start Visual mode.  'v'
  69.     works on characters and 'V' on lines.  Move the cursor to extend the
  70.     Visual part.  It is shown highlighted on the screen.  By typing 'o'
  71.     the other end of the Visual text can be moved.  The Visual text can
  72.     be affected by an operator:
  73.         d    delete
  74.         c    change
  75.         y    yank
  76.         > or <    insert or delete indent
  77.         !    filter through external program
  78.         =    filter through indent
  79.         :    start ":" command for the Visual lines.
  80.         Q    format text to 'textwidth' columns (obsolete)
  81.         gq    format text to 'textwidth' columns
  82.         J    join lines
  83.         ~    swap case
  84.         u    make lowercase
  85.         U    make uppercase
  86.  
  87. Block operators.                    |visual_block|
  88.     With Visual a rectangular block of text can be selected.  Start Visual
  89.     with CTRL-V.  The block can be deleted ('d'), yanked ('y') or its case
  90.     can be changed ('~', 'u' and 'U').  A deleted or yanked block can be
  91.     put into the text with the 'p' and 'P' commands.
  92.  
  93. Online help system.                    |:help|
  94.     Help is displayed in a window.  The usual commands can be used to
  95.     move around, search for a string, etc.  Tags can be used to jump
  96.     around in the help files, just like hypertext links.  The ":help"
  97.     command takes an argument to quickly jump to the info on a subject.
  98.     <F1> is the quick access to the help system.  The name of the help
  99.     index file can be set with the 'helpfile' option.
  100.  
  101. Command-line editing and history.            |cmdline_editing|
  102.     You can insert or delete at any place in the command-line using the
  103.     cursor keys.  The right/left cursor keys can be used to move
  104.     forward/backward one character.  The shifted right/left cursor keys
  105.     can be used to move forward/backward one word.  CTRL-B/CTRL-E can be
  106.     used to go to the begin/end of the command-line.
  107.  
  108.                             |cmdline_history|
  109.     The command-lines are remembered.  The up/down cursor keys can be used
  110.     to recall previous command-lines.  The 'history' option can be set to
  111.     the number of lines that will be remembered.  There is a separate
  112.     history for commands and for search patterns.
  113.  
  114. Command-line completion.                |cmdline_completion|
  115.     While entering a command-line (on the bottom line of the screen)
  116.     <Tab> can be typed to complete
  117.        what        example
  118.     - command    :e<Tab>
  119.     - tag        :ta scr<Tab>
  120.     - option    :set sc<Tab>
  121.     - option value  :set hf=<Tab>
  122.     - filename    :e ve<Tab>
  123.     - etc.
  124.  
  125.     If there are multiple matches, CTRL-N (next) and CTRL-P (previous)
  126.     will walk through the matches.  <Tab> works like CTRL-N, but wraps
  127.     around to the first match.
  128.  
  129.     The 'wildchar' option can be set to the character for command-line
  130.     completion, <Tab> is the default.  CTRL-D can be typed after an
  131.     (incomplete) wildcard; all matches will be listed.  CTRL-A will insert
  132.     all matches.  CTRL-L will insert the longest common part of the
  133.     matches.
  134.  
  135. Horizontal scrolling.                    |'wrap'|
  136.     If the 'wrap' option is off, long lines will not wrap and only part
  137.     of them will be shown.  When the cursor is moved to a part that is not
  138.     shown, the screen will scroll horizontally.  The minimum number of
  139.     columns to scroll can be set with the 'sidescroll' option.  The "zh"
  140.     and "zl" commands can be used to scroll sideways.
  141.  
  142. Text formatting.                    |formatting|
  143.     The 'textwidth' option can be used to automatically limit the line
  144.     length.  This supplements the 'wrapmargin' option of Vi, which was not
  145.     very useful.  The "gq" operator can be used to format a piece of text
  146.     (for example, "gqp" formats the current paragraph).  Commands for text
  147.     alignment: ":center", ":left" and ":right".
  148.  
  149. Edit-compile-edit speedup.                |quickfix|
  150.     The ":make" command can be used to run the compilation and jump to
  151.     the first error.  Alternatively Vim can be started with the "-e"
  152.     option from the compiler.  A file with compiler error messages is
  153.     interpreted.  Vim starts editing at the first error.
  154.  
  155.     Each line in the error file is scanned for the name of a file, line
  156.     number and error message.  The 'errorformat' option can be set to a
  157.     list of scanf-like strings to handle output from many compilers.
  158.  
  159.     The ":cn" command can be used to jump to the next error.
  160.     ":cl" lists all the error messages.  Other commands are available
  161.     (almost the same as with Manx's Z editor on the Amiga).
  162.     The 'errorfile' option has the name of the file with error messages.
  163.     The 'makeprg' option contains the name of the program to be executed
  164.     with the ":make" command.
  165.     The 'shellpipe' option contains the string to be used to put the
  166.     output of the compiler into the errorfile.
  167.  
  168. Improved indenting for C programs            |'cindent'|
  169.     When the 'cindent' option is on the indent of each line is
  170.     automatically adjusted.  C syntax is mostly recognized.  The indent
  171.     for various styles can be set with 'cinoptions'.  The keys to trigger
  172.     indenting can be set with 'cinkeys'.
  173.  
  174.     Comments can be automatically formatted.  The 'comment' option can be
  175.     set to the characters that start and end a comment.  This works best
  176.     for C code, but also works for e-mail (">" at start of the line) and
  177.     other types of text.  The "=" operator can be used to re-indent
  178.     lines.
  179.  
  180. Searching for words in include files            |include_search|
  181.     The "[i" command can be used to search for a match of the word under
  182.     the cursor in the current and included files.  The 'include' option
  183.     can be set the a pattern that describes a command to include a file
  184.     (the default is for C programs).
  185.     The "[I" command lists all matches, the "[ CTRL-I" command jumps to
  186.     a match.
  187.     The "[d", "[D" and "[ CTRL-D" commands do the same, but only for
  188.     lines where the pattern given with the 'define' option matches.
  189.  
  190. Word completion in Insert mode                |ins_completion|
  191.     In insert mode "CTRL-N" and "CTRL-P" can be used to find match with
  192.     the word before the cursor.  This is useful to complete long words.
  193.     "CTRL-X CTRL-I" can be used to complete the word before the cursor
  194.     from the current and included files.
  195.     "CTRL-X CTRL-K" can be used to complete the word before the cursor
  196.     from a dictionary file, given with the 'dictionary' option
  197.  
  198. Automatic commands                    |autocommand|
  199.     Commands can be automatically executed when reading a file, writing a
  200.     file, jumping to another buffer, etc., depending on the file name.
  201.     This is useful to set options and mappings for C programs,
  202.     documentation, plain text, e-mail, etc.  This also makes it possible
  203.     to edit compressed files.
  204.  
  205. Viminfo                            |viminfo_file|
  206.     The command-line history, marks and registers can be stored in a file
  207.     that is read on startup.  This can be used to repeat a search command
  208.     or command-line command after exiting and restarting Vim.  It is also
  209.     possible to jump right back to where the last edit stopped with "'0".
  210.     The 'viminfo' option can be set to select which items to store in the
  211.     .viminfo file.  This is off by default.
  212.  
  213. Mouse support                        |mouse_using|
  214.     The mouse is supported in the GUI version, in an xterm for Unix, for
  215.     MS-DOS, and Win32.  It can be used to position the cursor, select the
  216.     visual area, paste a register, etc.
  217.  
  218. Graphical User Interface (GUI)                |gui|
  219.     Included support for GUI: menu's, mouse, scrollbars, etc.  You can
  220.     define your own menus.  Better support for CTRL/SHIFT/ALT keys in
  221.     combination with special keys and mouse.  Currently only with Motif
  222.     and Athena interface.
  223.  
  224.  
  225. IMPROVEMENTS FROM VERSION 3.0 TO VERSION 4.0
  226. ============================================
  227.  
  228. Besides the big changes mentioned here there are an awful lot of small
  229. improvements.  For a more complete list see |new_features|.
  230.  
  231. New on-line help system                    |new_help|
  232.     Help is now displayed in a window.
  233.     Tags can be used to jump around in all the documentation (like
  234.     hypertext links).
  235.  
  236. Command-line editing improved                |new_commandline|
  237.     Separate history for search commands.
  238.     Improved command-line completion.
  239.  
  240. Improved indenting for C programs            |new_cindent|
  241.     Added 'cindent' option for configurable C indent mode.
  242.     The "=" operator can be used to indent lines.
  243.     Formatting of comments (also for other languages and e-mail).
  244.  
  245. Searching for words in include files            |new_include|
  246.     Added commands to search for a word in the current file and in
  247.     included files.
  248.     List the first match, list all matches or jump to a match.
  249.  
  250. Word completion in Insert mode                |new_complete|
  251.     Added commands to complete the word before the cursor in Insert mode.
  252.     Matches can be found in the current file, included files and/or a
  253.     dictionary.
  254.  
  255. Automatic commands                    |new_autocmd|
  256.     Execute commands for a specific file type.
  257.     Can be used to set options to a different value for C code, plain
  258.     text e-mail, etc.
  259.  
  260. Text objects                        |new_textobj|
  261.     After an operator and in visual mode text object commands can be used
  262.     to quickly select a word, line or paragraph.
  263.  
  264. Options                            |new_options|
  265.     Added '&' after an option: reset to default value.
  266.     Added '!' after a boolean option: invert value.
  267.     A whole bunch of new options.
  268.     Command-line completion can be used to get the old value.
  269.  
  270. Support for editing one-line paragraphs            |new_para|
  271.     When a line is longer than the window width, it can be broken at a
  272.     space or other convenient position.
  273.     Commands have been added to move the cursor a screen line up/down.
  274.  
  275. Usage of key names                    |new_keys|
  276.     Special keys now all have a name like <Up>, <End>, etc.
  277.     This name is used for mappings, in listings, and many other things.
  278.     Added a number of new special keys.
  279.  
  280. Viminfo                            |new_viminfo|
  281.     The command-line history, marks and registers can be stored in a file
  282.     that is read on startup.
  283.  
  284. Compilation improvements                |compilation|
  285.     Autoconf is used to adjust to different Unix flavors, editing the
  286.     Makefile is rarely required.
  287.  
  288. Tag support improved                    |new_tags|
  289.     Static tags and Emacs tag files are now supported.
  290.     Tag completion works better.
  291.  
  292. Improved (error) messages                |new_msg|
  293.     A lot of error messages include the reason for the error.
  294.     The text shown when 'showcmd' is set includes partially typed
  295.     mappings.
  296.  
  297. Swap file                        |new_swapfile|
  298.     Included checking of the actual file name in a swap file, avoids
  299.     giving bogus "swap file exists" messages.
  300.     Give more information about the swap file with the "swap file exists"
  301.     message and when recovering.
  302.     Included catching of deadly signals for Unix.  Swap files for
  303.     unmodified buffers are deleted, other swap files are preserved before
  304.     exiting.
  305.     Improved recovery when there are multiple swap files.
  306.  
  307. Mouse support                        |new_mouse|
  308.     The mouse is supported in the GUI version, in an xterm for Unix, for
  309.     MS-DOS, and Win32.  It can be used to position the cursor, select the
  310.     visual area, paste a register, etc.
  311.  
  312. Graphical User Interface (GUI)                |new_gui|
  313.     Included support for GUI: menu's, mouse, scrollbars, etc.  Currently
  314.     only with Motif and Athena interface.
  315.  
  316. Support for Windows 95/NT                |new_win32|
  317.     There is now a version of Vim for Windows NT and Windows 95.  It
  318.     supports long file names, uses all available memory and many more
  319.     enhancements.
  320.     There is also a protected mode version, compiled with DJGPP, that
  321.     runs under Windows 3.1 and MS-DOS.  It supports long file names where
  322.     available.
  323.  
  324. Miscellaneous new features                |new_misc|
  325.     Implemented incremental search.
  326.     A whole bunch of commands that start with "g": Goto declaration, show
  327.     ascii value of character under the cursor, go back to end of word,
  328.     reselect last Visual area, etc..
  329.     Added the ":retab" command.  Can be used to change the size of a
  330.     <Tab>, replace spaces with a <Tab> or a <Tab> with spaces.
  331.     Implemented "Vim -r" to list any swap files that can be found.
  332.     The "Q" operator no longer affects empty lines.
  333.     Added '-' register for deletes of less than one line, see |registers|.
  334.     Quickfix: Support for several error formats at the same time.
  335.     Added separate mapping for normal mode and visual mode.
  336.     Allow for digraphs to be entered in reverse.
  337.     Added commands to search for #if/#endif and start/end of comment.
  338.     Added ":abclear" and ":mapclear": remove all abbreviations/mappings.
  339.     Added check for last modification time of original file before
  340.     overwriting it.
  341.  
  342. vi compatibility improvements                |vi_compat|
  343.     A few more things have been made vi-compatible.
  344.     The 'cpoptions' option has a few flags to switch specific
  345.     vi-compatibility items on/off.
  346.  
  347.  
  348. OLDER VIM FEATURES
  349. ==================
  350.  
  351. These features were already present in Vim version 3.0.
  352.  
  353.  
  354. Vim arguments:
  355.  
  356. When Vim is started with "-v" (View) then readonly mode is used (includes
  357. "-n").
  358.  
  359. When Vim is started with "-b" (Binary) then some options are set to be able
  360. to edit binary or executable files.
  361.  
  362. When Vim is started with "-s scriptfile", the characters read from
  363. "scriptfile" are treated as if you typed them.  If end of file is reached
  364. before the editor exits, further characters are read from the console.
  365.  
  366. The "-w" option can be used to record all typed characters in a script file.
  367. This file can then be used to redo the editing, possibly on another file or
  368. after changing some commands in the script file.
  369.  
  370. The "-n" option disables the writing of a ".swp" file (see below).
  371.  
  372. The "-c command" option does the same as the "+command" option.
  373.  
  374. The "-T terminal" option sets the terminal type.
  375.  
  376. The "-e" option starts Vim in quickfix mode.
  377.  
  378. The "-o" option opens a window for each argument.  "-o4" opens four windows.
  379.  
  380.  
  381. In command mode:
  382.  
  383. Missing command: "Q" (go to Ex mode) (but see |pseudo-Q|).
  384. Missing Ex commands: append, change, insert, open and z.
  385.  
  386. The command characters are shown in the last line of the screen.  They are
  387. removed when the command is finished.  If you do not want this (on a slow
  388. terminal) reset the 'showcmd' option.
  389.  
  390. If the 'ruler' option is set, the current cursor position is shown in the
  391. last line of the screen.
  392.  
  393. 'u' and CTRL-R accept a count for the number of undos/redos.
  394.  
  395. 'U' still works after having moved off the last changed line and after 'u'.
  396.  
  397. Nulls in the file are replaced with <NL> internally.  This allows editing of
  398. binary files (more or less).
  399.  
  400. Characters with the 8th bit set are displayed.  The characters between '~' and
  401. 0xa0 are displayed as "~?", "~@", "~A", etc., unless the "graphic' option is
  402. set.
  403.  
  404. '=' is an operator to filter lines through an external command (vi: lisp
  405. stuff).  The name of the command can be set with the 'equalprg' option.  The
  406. default is "indent".
  407.  
  408. '][' goes to the next ending of a C function ('}' in column 1).
  409. '[]' goes to the previous ending of a C function ('}' in column 1).
  410.  
  411. ']f', '[f' and 'gf' start editing the file whose name is under the cursor.
  412. CTRL-W f splits the window and starts editing the file whose name is under
  413. the cursor.
  414.  
  415. '*' searches forward for the identifier under the cursor, '#' backward.
  416. 'K' runs the program defined by the "keywordprg" option, with the identifier
  417. under the cursor as argument.
  418.  
  419. '%' can be preceded with a count.  The cursor jumps to the line that
  420. percentage down in the file.  The normal '%' function to jump to the matching
  421. brace skips braces inside quotes.
  422.  
  423. With the CTRL-] command, the cursor may be in the middle of the identifier.
  424.  
  425. The used tags are remembered.  Commands that can be used with the tag stack
  426. are CTRL-T, ':pop' and ':tag'.  ':tags' lists the tag stack.
  427.  
  428. The 'tags' option can be set to a list of tag file names.  Thus multiple
  429. tag files can be used.  For file names that start with '.', the '.' is
  430. replaced with the path of the current file.  This makes it possible to use a
  431. tags file in the same directory as the file being edited.
  432.  
  433. Previously used file names are remembered in the alternate file name list.
  434. CTRL-^ accepts a count, which is an index in this list.
  435.  
  436. Search patterns have more features.  The <NL> character is seen as part of the
  437. search pattern and the substitute string of ":s".  Vi sees it as the end of
  438. the command.
  439.  
  440. Searches can put the cursor on the end of a match and may include a character
  441. offset.
  442.  
  443. Count added to '~', ':next', ':Next', 'n' and 'N'.
  444.  
  445. The command ":next!" with 'autowrite' set does not write the file.  In vi the
  446. file was written, but this is considered to be a bug, because one does not
  447. expect it and the file is not written with ':rewind!'.
  448.  
  449. "5r<CR>" replaces five characters with five line breaks.  Vi replaces five
  450. characters with a single line break.
  451.  
  452. In Vi when entering a <CR> in replace mode deletes a character only when 'ai'
  453. is set (but does not show it until you hit <Esc>).  Vim always deletes a
  454. character (and shows it immediately).
  455.  
  456. Added :wnext command.  Same as ":write" followed by ":next".
  457.  
  458. The ":w!" command always writes, also when the file is write protected.
  459.  
  460. If option "tildeop" has been set, '~' is an operator (must be followed by a
  461. movement command).
  462.  
  463. With the 'J' (join) command you can reset the 'joinspaces' (js) option to
  464. have only one space after a period (Vi inserts two spaces).
  465.  
  466. 'cw' can be used to change white space formed by several characters (Vi is
  467. confusing: 'cw' only changes one space, while 'dw' deletes all white space).
  468.  
  469. 'o' and 'O' accept a count for repeating the insert (Vi clears a part of
  470. display).
  471.  
  472. ':dis' command shows the contents of the yank registers.
  473.  
  474. Previously used file names are remembered in the alternate file name list.
  475. ":files" command shows the list of alternate filenames.
  476. '#'<N> is replaced with the <N>th alternate filename in the list.
  477. "#<" is replaced with the current filename without extension.
  478.  
  479. Flags after command not supported (no plans to include it).
  480.  
  481. On non-UNIX systems ":cd" command shows current directory instead of going to
  482. the home directory.  ":pwd" prints the current directory on all systems.
  483.  
  484. ':source!' command reads Vi commands from a file.
  485.  
  486. ':mkexrc' command writes current modified options and mappings to a ".exrc"
  487. file.  ':mkvimrc' writes to a ".vimrc" file.
  488.  
  489. No check for "tail recursion" with mappings.  This allows things like
  490. ":map! foo ^]foo".
  491.  
  492. When a mapping starts with number, vi loses the count typed before it (e.g.
  493. when using the mapping ":map g 4G" the command "7g" goes to line 4).  This is
  494. considered a vi bug.  Vim concatenates the counts (in the example it becomes
  495. "74G"), as most people would expect.
  496.  
  497. The :put! command inserts the contents of a register above the current line.
  498.  
  499. The 'p' and 'P' commands of vi cannot be repeated with '.' when the putted
  500. text is less than a line.  In Vim they can always be repeated.
  501.  
  502. The named register '.' can be used with commands p, P and :put.  The contents
  503. of the register is the last inserted text.
  504.  
  505. ":noremap" command can be used to enter a mapping that will not be remapped.
  506. This is useful to exchange the meaning of two keys.  ":cmap", ":cunmap" and
  507. ":cnoremap" can be used for mapping in command-line editing only.  ":imap",
  508. ":iunmap" and ":inoremap" can be used for mapping in insert mode only.
  509. Similar commands exist for abbreviations: ":noreabbrev", ":iabbrev"
  510. ":cabbrev", ":iunabbrev", ":cunabbrev", ":inoreabbrev", ":cnoreabbrev".
  511.  
  512. In vi the command ":map foo bar" would remove a previous mapping
  513. ":map bug foo".  This is considered a bug, so it is not included in Vim.
  514. ":unmap! foo" does remove ":map! bug foo", because unmapping would be very
  515. difficult otherwise (this is vi compatible).
  516.  
  517. ":@r" command executes register r (is in some versions of vi).
  518.  
  519. The ':' register contains the last command-line.
  520. The '%' register contians the current file name.
  521.  
  522. CTRL-O/CTRL-I can be used to jump to older/newer positions.  These are the
  523. same positions as used with the '' command, but may be in another file.  The
  524. ':jumps' command lists the older positions.
  525.  
  526. If the 'shiftround' option is set, an indent is rounded to a multiple of
  527. 'shiftwidth' with '>' and '<' commands.
  528.  
  529. The 'scrolljump' option can be set to the minimum number of lines to scroll
  530. when the cursor gets off the screen.  Use this when scrolling is slow.
  531.  
  532. The 'scrolloff' option can be set to the minimum number of lines to keep
  533. above and below the cursor.  This gives some context to where you are
  534. editing.  When set to a large number the cursor line is always in the middle
  535. of the window.
  536.  
  537. Uppercase marks can be used to jump between files.  The ':marks' command lists
  538. all currently set marks.  The commands "']" and "`]" jump to the end of the
  539. previous operator or end of the text inserted with the put command.  "'[" and
  540. "`[" do jump to the start.
  541.  
  542. The 'shelltype' option can be set to reflect the type of shell used.
  543.  
  544. The 'highlight' option can be set for the higlight mode to be used for
  545. several commands.
  546.  
  547. The CTRL-A (add) and CTRL-X (subtract) commands are new.  The count to the
  548. command (default 1) is added to/subtracted from the number at or after the
  549. cursor.  That number may be decimal, octal (starts with a '0') or hexadecimal
  550. (starts with '0x').  Very useful in macros.
  551.  
  552. With the :set command the prefix "inv" can be used to invert toggle options.
  553.  
  554. In both Vi and Vim you can create a line break with the ":substitute" command
  555. by using a CTRL-M.  For Vi this means you cannot insert a real CTRL-M in the
  556. text.  With Vim you can put a real CTRL-M in the text by preceding it with a
  557. CTRL-V.
  558.  
  559.  
  560. In insert mode:
  561.  
  562. If the 'revins' option is set, insert happens backwards.  This is for typing
  563. Hebrew.  When inserting normal characters the cursor will not be shifted and
  564. the text moves rightwards.  Backspace, CTRL-W and CTRL-U will also work in
  565. the opposite direction.  CTRL-B toggles the 'revins' option.  In replace mode
  566. 'revins' has no effect.
  567.  
  568. The backspace key can be used just like CTRL-D to remove auto-indents.
  569.  
  570. You can backspace, ctrl-U and CTRL-W over line breaks if the 'backspace' (bs)
  571. option is set to non-zero.  You can backspace over the start of insert if the
  572. 'backspace' option is set to 2.
  573.  
  574. When the 'paste' option is set, a few option are reset and mapping in insert
  575. mode and abbreviation are disabled.  This allows for pasting text in windowing
  576. systems without unexpected results.  When the 'paste' option is reset, the old
  577. option values are restored.
  578.  
  579. CTRL-T/CTRL-D always insert/delete an indent in the current line, no matter
  580. what column the cursor is in.
  581.  
  582. CTRL-@ (insert previously inserted text) works always (Vi: only when typed as
  583. first character).
  584.  
  585. CTRL-A works like CTRL-@ but does not leave insert mode.
  586.  
  587. CTRL-R <0-9a-z> can be used to insert the contents of a register.
  588.  
  589. When the 'smartindent' (si) option is set, C programs will be better
  590. auto-indented.
  591.  
  592. CTRL-Y and CTRL-E can be used to copy a character from above/below the
  593. current cursor position.
  594.  
  595. After CTRL-V you can enter a three digit decimal number.  This byte value is
  596. inserted in the text as a single character.  Useful for international
  597. characters that are not on your keyboard.
  598.  
  599. When the 'expandtab' (et) option is set, a <Tab> is expanded to the
  600. appropriate number of spaces.
  601.  
  602. The window always reflects the contents of the buffer (Vi does not do this
  603. when changing text and in some other cases).
  604.  
  605. If Vim is compiled with DIGRAPHS defined, digraphs are supported.  A set of
  606. normal Amiga digraphs is included.  They are shown with the :digraph" command.
  607. More can be added with ":digraph {char1}{char2} {number}".  A digraph is
  608. entered with "CTRL-K {char1} {char2}" or "{char1} BS {char2}" (only when
  609. 'digraph' option is set).
  610.  
  611. When repeating an insert, e.g. "10atest <Esc>" vi would only handle wrapmargin
  612. for the first insert.  Vim does it for all.
  613.  
  614. A count to the 'i' or 'a' command is used for all the text.  Vi uses the count
  615. only for one line.  "3iabc<NL>def<Esc>" would insert "abcabcacc<NL>def" in Vi
  616. but "abc<NL>defabc<NL>defabc<NL>def" in Vim.
  617.  
  618.  
  619. In Command-line mode:
  620.  
  621. <Esc> terminates the command-line without executing it. In vi the command
  622. line would be executed, which is not what most people expect (hitting <Esc>
  623. should always get you back to command mode).  To avoid problems with some
  624. obscure macros, an <Esc> in a macro will execute the command.  If you want a
  625. typed <Esc> to execute the command like vi does you can fix this with
  626.     ":cmap ^V<Esc> ^V<CR>"
  627.  
  628. general:
  629.  
  630. Missing options: autoprint (ap), beautify (bf), hardtabs (ht), lisp, mesg,
  631. open, optimize (op), prompt, redraw, slowopen (slow), window, w300, w1200 and
  632. w9600.  These options can be set but are otherwise ignored.
  633.  
  634. When the 'compatible' option is set, all options are set for maximum
  635. vi-compatibility
  636.  
  637. The 'ttimeout' option is like 'timeout', but only works for cursor and
  638. function keys, not for ordinary mapped characters.  The 'timoutlen' option
  639. gives the number of milliseconds that is waited for.  If the 'esckeys' option
  640. is not set, cursor and function keys that start with <Esc> are not recognized
  641. in insert mode.
  642.  
  643. There is an option for each terminal string.  Can be used when termcap is not
  644. supported or to change individual strings.
  645.  
  646. When the 'textmode' option is set (default for MS-DOS, OS/2, and Win32)
  647. <CR><NL> is used as line separator.  When reset (default for Unix and Amiga)
  648. <NL> is used.  When the 'textauto' option is set, Vim tries to detect the
  649. type of line separator used by reading up to the first <NL>.  The 'textmode'
  650. option is set accordingly.
  651.  
  652. On systems that have no job control (older Unix systems and non-Unix systems)
  653. the CTRL-Z, ":stop" or ":suspend" command starts a new shell.
  654.  
  655. If Vim is started on the Amiga without an interactive window for output, a
  656. window is opened (and :sh still works).  You can give a device to use for
  657. editing with the '-d' argument, e.g. "-d con:20/20/600/150".
  658.  
  659. On startup the VIMINIT or EXINIT environment variables, the file s:.vimrc or
  660. s:.exrc and .vimrc or .exrc are read for initialization commands.  When
  661. reading .vimrc and .exrc some commands are not allowed because of security
  662. reasons (shell commands and writing to a file, :map commands are echoed).
  663. This can be overrided with the 'secure' option.
  664.  
  665. Line length can be at least up to the maximum value of an int (for the Amiga
  666. 32767 characters, for most 32-bit systems much larger).  Editing such lines
  667. is not always possible.  File length up to 2147483646 lines.  If a line is
  668. larger than the screen, the last line is filled with <@>s and only the part
  669. of the line before that is shown (unless 'wrap' option is reset).
  670.  
  671. The 'columns' option is used to set or get the width of the display.
  672.  
  673. The name of the current file name is shown in the title bar of the window.
  674.  
  675. Wildcards in file names are expanded.
  676.  
  677. Option settings are read from the first and last few lines of the file.
  678. Option 'modelines' determines how many lines are tried (default is 5).  Note
  679. that this is different from the Vi versions that can execute any Ex command
  680. in a modeline (a major security problem).
  681.  
  682. If the 'insertmode' option is set (e.g. in .exrc), Vim starts in insert mode.
  683.  
  684. All text is kept in memory.  Available memory limits the file size (and other
  685. things such as undo).  This may be a problem with MS-DOS, is hardly a problem
  686. on the Amiga and almost never with Unix and Win32.
  687.  
  688. If the 'backup' or 'writebackup' option is set: Before a file is overwritten,
  689. a backup file (.bak) is made.  If the "backup" option is set it is left
  690. behind.
  691.  
  692. If the 'binary' option is set and the file does not have an end-of-line for
  693. the last line, the end-of-line is not appended when writing.
  694.  
  695. Vim creates a file ending in ".swp" to store parts of the file that have been
  696. changed or that do not fit in memory.  This file can be used to recover from
  697. an aborted editing session with "vim -r file".  Using the swap file can be
  698. switched off by setting the 'updatecount' option to 0 or starting Vim with
  699. the "-n" option.  Use the 'directory' option for placing the .swp file
  700. somewhere else.
  701.  
  702. The 'shortname' (sn) option, when set, tells Vim that ".bak" and ".swp"
  703. filenames are to be MS-DOS-like: 8 characters plus 3 for extention.  This
  704. should be used on messydos or crossdos filesystems on the Amiga.  If this
  705. option is off, Vim tries to guess if MS-DOS filename restrictions are
  706. effective.
  707.  
  708. Error messages are shown at least one second (Vi overwrites error messages).
  709.  
  710. If Vim asks to "Hit RETURN to continue", you can hit any key.  Characters
  711. other than <CR>, <NL> and <Space> are interpreted as the (start of) a
  712. command.  (Vi only accepts a command starting with ':').
  713.  
  714. The contents of the numbered and unnamed registers is remembered when
  715. changing files.
  716.  
  717. The "No lines in buffer" message is a normal message instead of an error
  718. message, since that may cause a mapping to be aborted.
  719.  
  720. The AUX: device of the Amiga is supported.
  721.  
  722.  vim:tw=77:js:
  723.