diff options
author | Michael Reed <Pyrohh@users.noreply.github.com> | 2015-11-23 18:37:36 -0500 |
---|---|---|
committer | Michael Reed <Pyrohh@users.noreply.github.com> | 2015-11-23 18:37:36 -0500 |
commit | 84a5709a86cc8d2d90cc29eea26f254b9b5d85fa (patch) | |
tree | 380b9279ceda787e022f46589baf7c5f03bd574c | |
parent | 80cf03602ea68f47c3e70f5193c5c2380940fe45 (diff) | |
parent | 53f44310d7df995d892d3a9d5c57660617bee95e (diff) | |
download | rneovim-84a5709a86cc8d2d90cc29eea26f254b9b5d85fa.tar.gz rneovim-84a5709a86cc8d2d90cc29eea26f254b9b5d85fa.tar.bz2 rneovim-84a5709a86cc8d2d90cc29eea26f254b9b5d85fa.zip |
Merge pull request #3624 from Pyrohh/vi_diff
[RFC] vi_diff.txt pruning
-rw-r--r-- | runtime/doc/options.txt | 1 | ||||
-rw-r--r-- | runtime/doc/starting.txt | 2 | ||||
-rw-r--r-- | runtime/doc/vi_diff.txt | 510 |
3 files changed, 4 insertions, 509 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 2b1044bead..d21217148c 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -991,7 +991,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'belloff'* *'bo'* 'belloff' 'bo' string (default "") global - {not in Vi} Specifies for which events the bell will not be rung. It is a comma separated list of items. For each item that is present, the bell will be silenced. This is most useful to specify specific events in diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt index f729fbefcc..f46a258e2e 100644 --- a/runtime/doc/starting.txt +++ b/runtime/doc/starting.txt @@ -28,8 +28,6 @@ More generally, Vim is started with: Option arguments and file name arguments can be mixed, and any number of them can be given. However, watch out for options that take an argument. -For compatibility with various Vi versions, see |cmdline-arguments|. - Exactly one out of the following five items may be used to choose how to start editing: diff --git a/runtime/doc/vi_diff.txt b/runtime/doc/vi_diff.txt index fffb923219..74277b3977 100644 --- a/runtime/doc/vi_diff.txt +++ b/runtime/doc/vi_diff.txt @@ -10,36 +10,11 @@ Throughout the help files differences between Vim and Vi/Ex are given in curly braces, like "{not in Vi}". This file only lists what has not been mentioned in other files and gives an overview. -1. Missing options |missing-options| -2. Limits |limits| -3. The most interesting additions |vim-additions| -4. Other vim features |other-features| -5. Command-line arguments |cmdline-arguments| +1. Limits |limits| +2. The most interesting additions |vim-additions| ============================================================================== -1. Missing options *missing-options* - -These options are in the Unix Vi, but not in Vim. - -autoprint (ap) boolean (default on) *'autoprint'* *'ap'* -beautify (bf) boolean (default off) *'beautify'* *'bf'* -flash (fl) boolean (default ??) *'flash'* *'fl'* -graphic (gr) boolean (default off) *'graphic'* *'gr'* -hardtabs (ht) number (default 8) *'hardtabs'* *'ht'* - number of spaces that a <Tab> moves on the display -mesg boolean (default on) *'mesg'* -novice boolean (default off) *'novice'* -open boolean (default on) *'open'* -optimize (op) boolean (default off) *'optimize'* *'op'* -redraw boolean (default off) *'redraw'* -slowopen (slow) boolean (default off) *'slowopen'* *'slow'* -sourceany boolean (default off) *'sourceany'* -w300 number (default 23) *'w300'* -w1200 number (default 23) *'w1200'* -w9600 number (default 23) *'w9600'* - -============================================================================== -2. Limits *limits* +1. Limits *limits* Vim has only a few limits for the files that can be edited {Vi: can not handle <Nul> characters and characters above 128, has limited line length, many other @@ -83,7 +58,7 @@ don't want a swap file at all, set 'updatecount' to 0, or use the "-n" argument when starting Vim. ============================================================================== -3. The most interesting additions *vim-additions* +2. The most interesting additions *vim-additions* Vi compatibility. |'compatible'| Although Vim is 99% Vi compatible, some things in Vi can be @@ -418,482 +393,5 @@ Move cursor beyond lines. screen, also where there is no text. This is useful to edit tables and figures easily. -============================================================================== -5. Other vim features *other-features* - -A random collection of nice extra features. - - -When Vim is started with "-s scriptfile", the characters read from -"scriptfile" are treated as if you typed them. If end of file is reached -before the editor exits, further characters are read from the console. - -The "-w" option can be used to record all typed characters in a script file. -This file can then be used to redo the editing, possibly on another file or -after changing some commands in the script file. - -The "-o" option opens a window for each argument. "-o4" opens four windows. - -Vi requires several termcap entries to be able to work full-screen. Vim only -requires the "cm" entry (cursor motion). - - -In command mode: - -When the 'showcmd' option is set, the command characters are shown in the last -line of the screen. They are removed when the command is finished. - -If the 'ruler' option is set, the current cursor position is shown in the -last line of the screen. - -"U" still works after having moved off the last changed line and after "u". - -Characters with the 8th bit set are displayed. The characters between '~' and -0xa0 are displayed as "~?", "~@", "~A", etc., unless they are included in the -'isprint' option. - -"][" goes to the next ending of a C function ('}' in column 1). -"[]" goes to the previous ending of a C function ('}' in column 1). - -"]f", "[f" and "gf" start editing the file whose name is under the cursor. -CTRL-W f splits the window and starts editing the file whose name is under -the cursor. - -"*" searches forward for the identifier under the cursor, "#" backward. -"K" runs the program defined by the 'keywordprg' option, with the identifier -under the cursor as argument. - -"%" can be preceded with a count. The cursor jumps to the line that -percentage down in the file. The normal "%" function to jump to the matching -brace skips braces inside quotes. - -With the CTRL-] command, the cursor may be in the middle of the identifier. - -The used tags are remembered. Commands that can be used with the tag stack -are CTRL-T, ":pop" and ":tag". ":tags" lists the tag stack. - -The 'tags' option can be set to a list of tag file names. Thus multiple -tag files can be used. For file names that start with "./", the "./" is -replaced with the path of the current file. This makes it possible to use a -tags file in the same directory as the file being edited. - -Previously used file names are remembered in the alternate file name list. -CTRL-^ accepts a count, which is an index in this list. -":files" command shows the list of alternate file names. -"#<N>" is replaced with the <N>th alternate file name in the list. -"#<" is replaced with the current file name without extension. - -Search patterns have more features. The <NL> character is seen as part of the -search pattern and the substitute string of ":s". Vi sees it as the end of -the command. - -Searches can put the cursor on the end of a match and may include a character -offset. - -Count added to "~", ":next", ":Next", "n" and "N". - -The command ":next!" with 'autowrite' set does not write the file. In vi the -file was written, but this is considered to be a bug, because one does not -expect it and the file is not written with ":rewind!". - -In Vi when entering a <CR> in replace mode deletes a character only when 'ai' -is set (but does not show it until you hit <Esc>). Vim always deletes a -character (and shows it immediately). - -Added :wnext command. Same as ":write" followed by ":next". - -The ":w!" command always writes, also when the file is write protected. In Vi -you would have to do ":!chmod +w %:S" and ":set noro". - -When 'tildeop' has been set, "~" is an operator (must be followed by a -movement command). - -With the "J" (join) command you can reset the 'joinspaces' option to have only -one space after a period (Vi inserts two spaces). - -"cw" can be used to change white space formed by several characters (Vi is -confusing: "cw" only changes one space, while "dw" deletes all white space). - -"o" and "O" accept a count for repeating the insert (Vi clears a part of -display). - -Flags after Ex commands not supported (no plans to include it). - -On non-UNIX systems ":cd" command shows current directory instead of going to -the home directory (there isn't one). ":pwd" prints the current directory on -all systems. - -After a ":cd" command the file names (in the argument list, opened files) -still point to the same files. In Vi ":cd" is not allowed in a changed file; -otherwise the meaning of file names change. - -":source!" command reads Vi commands from a file. - -":mkexrc" command writes current modified options and mappings to a ".exrc" -file. ":mkvimrc" writes to a ".vimrc" file. - -No check for "tail recursion" with mappings. This allows things like -":map! foo ^]foo". - -When a mapping starts with number, vi loses the count typed before it (e.g. -when using the mapping ":map g 4G" the command "7g" goes to line 4). This is -considered a vi bug. Vim concatenates the counts (in the example it becomes -"74G"), as most people would expect. - -The :put! command inserts the contents of a register above the current line. - -The "p" and "P" commands of vi cannot be repeated with "." when the putted -text is less than a line. In Vim they can always be repeated. - -":noremap" command can be used to enter a mapping that will not be remapped. -This is useful to exchange the meaning of two keys. ":cmap", ":cunmap" and -":cnoremap" can be used for mapping in command-line editing only. ":imap", -":iunmap" and ":inoremap" can be used for mapping in insert mode only. -Similar commands exist for abbreviations: ":noreabbrev", ":iabbrev" -":cabbrev", ":iunabbrev", ":cunabbrev", ":inoreabbrev", ":cnoreabbrev". - -In Vi the command ":map foo bar" would remove a previous mapping -":map bug foo". This is considered a bug, so it is not included in Vim. -":unmap! foo" does remove ":map! bug foo", because unmapping would be very -difficult otherwise (this is vi compatible). - -The ':' register contains the last command-line. -The '%' register contains the current file name. -The '.' register contains the last inserted text. - -":dis" command shows the contents of the yank registers. - -CTRL-O/CTRL-I can be used to jump to older/newer positions. These are the -same positions as used with the '' command, but may be in another file. The -":jumps" command lists the older positions. - -If the 'shiftround' option is set, an indent is rounded to a multiple of -'shiftwidth' with ">" and "<" commands. - -The 'scrolljump' option can be set to the minimum number of lines to scroll -when the cursor gets off the screen. Use this when scrolling is slow. - -The 'scrolloff' option can be set to the minimum number of lines to keep -above and below the cursor. This gives some context to where you are -editing. When set to a large number the cursor line is always in the middle -of the window. - -Uppercase marks can be used to jump between files. The ":marks" command lists -all currently set marks. The commands "']" and "`]" jump to the end of the -previous operator or end of the text inserted with the put command. "'[" and -"`[" do jump to the start. - -The 'highlight' option can be set for the highlight mode to be used for -several commands. - -The CTRL-A (add) and CTRL-X (subtract) commands are new. The count to the -command (default 1) is added to/subtracted from the number at or after the -cursor. That number may be decimal, octal (starts with a '0') or hexadecimal -(starts with '0x'). Very useful in macros. - -With the :set command the prefix "inv" can be used to invert boolean options. - -In both Vi and Vim you can create a line break with the ":substitute" command -by using a CTRL-M. For Vi this means you cannot insert a real CTRL-M in the -text. With Vim you can put a real CTRL-M in the text by preceding it with a -CTRL-V. - - -In Insert mode: - -If the 'revins' option is set, insert happens backwards. This is for typing -Hebrew. When inserting normal characters the cursor will not be shifted and -the text moves rightwards. Backspace, CTRL-W and CTRL-U will also work in -the opposite direction. CTRL-B toggles the 'revins' option. In replace mode -'revins' has no effect. Only when enabled at compile time. - -The backspace key can be used just like CTRL-D to remove auto-indents. - -You can backspace, CTRL-U and CTRL-W over line breaks if the 'backspace' (bs) -option includes "eol". You can backspace over the start of insert if the -'backspace' option includes "start". - -When the 'paste' option is set, a few options are reset and mapping in insert -mode and abbreviation are disabled. This allows for pasting text in windowing -systems without unexpected results. When the 'paste' option is reset, the old -option values are restored. - -CTRL-T/CTRL-D always insert/delete an indent in the current line, no matter -what column the cursor is in. - -CTRL-@ (insert previously inserted text) works always (Vi: only when typed as -first character). - -CTRL-A works like CTRL-@ but does not leave insert mode. - -CTRL-R {0-9a-z..} can be used to insert the contents of a register. - -When the 'smartindent' option is set, C programs will be better auto-indented. -With 'cindent' even more. - -CTRL-Y and CTRL-E can be used to copy a character from above/below the -current cursor position. - -After CTRL-V you can enter a three digit decimal number. This byte value is -inserted in the text as a single character. Useful for international -characters that are not on your keyboard. - -When the 'expandtab' (et) option is set, a <Tab> is expanded to the -appropriate number of spaces. - -The window always reflects the contents of the buffer (Vi does not do this -when changing text and in some other cases). - -If Vim is compiled with DIGRAPHS defined, digraphs are supported. A set of -normal digraphs is included. They are shown with the ":digraph" command. -More can be added with ":digraph {char1}{char2} {number}". A digraph is -entered with "CTRL-K {char1} {char2}" or "{char1} BS {char2}" (only when -'digraph' option is set). - -When repeating an insert, e.g. "10atest <Esc>" vi would only handle wrapmargin -for the first insert. Vim does it for all. - -A count to the "i" or "a" command is used for all the text. Vi uses the count -only for one line. "3iabc<NL>def<Esc>" would insert "abcabcabc<NL>def" in Vi -but "abc<NL>defabc<NL>defabc<NL>def" in Vim. - - -In Command-line mode: - -<Esc> terminates the command-line without executing it. In vi the command -line would be executed, which is not what most people expect (hitting <Esc> -should always get you back to command mode). To avoid problems with some -obscure macros, an <Esc> in a macro will execute the command. If you want a -typed <Esc> to execute the command like vi does you can fix this with - ":cmap ^V<Esc> ^V<CR>" - -General: - -The 'ttimeout' option is like 'timeout', but only works for cursor and -function keys, not for ordinary mapped characters. The 'timeoutlen' option -gives the number of milliseconds that is waited for. If the 'esckeys' option -is not set, cursor and function keys that start with <Esc> are not recognized -in insert mode. - -There is an option for each terminal string. Can be used when termcap is not -supported or to change individual strings. - -The 'fileformat' option can be set to select the <EOL>: "dos" <CR><NL>, "unix" -<NL> or "mac" <CR>. -When the 'fileformats' option is not empty, Vim tries to detect the type of -<EOL> automatically. The 'fileformat' option is set accordingly. - -On systems that have no job control (older Unix systems and non-Unix systems) -the CTRL-Z, ":stop" or ":suspend" command starts a new shell. - -The 'columns' and 'lines' options are used to set or get the width and height -of the display. - -Option settings are read from the first and last few lines of the file. -Option 'modelines' determines how many lines are tried (default is 5). Note -that this is different from the Vi versions that can execute any Ex command -in a modeline (a major security problem). |trojan-horse| - -If the 'insertmode' option is set (e.g. in .exrc), Vim starts in insert mode. -And it comes back there, when pressing <Esc>. - -Undo information is kept in memory. Available memory limits the number and -size of change that can be undone. This may be a problem with MS-DOS, but is -almost never one with Unix and Win32. - -If the 'backup' or 'writebackup' option is set: Before a file is overwritten, -a backup file (.bak) is made. If the "backup" option is set it is left -behind. - -Vim creates a file ending in ".swp" to store parts of the file that have been -changed or that do not fit in memory. This file can be used to recover from -an aborted editing session with "vim -r file". Using the swap file can be -switched off by setting the 'updatecount' option to 0 or starting Vim with -the "-n" option. Use the 'directory' option for placing the .swp file -somewhere else. - -Error messages are shown at least one second (Vi overwrites error messages). - -If Vim gives the |hit-enter| prompt, you can hit any key. Characters other -than <CR>, <NL> and <Space> are interpreted as the (start of) a command. (Vi -only accepts a command starting with ':'). - -The contents of the numbered and unnamed registers is remembered when -changing files. - -The "No lines in buffer" message is a normal message instead of an error -message, since that may cause a mapping to be aborted. - -============================================================================== -5. Command-line arguments *cmdline-arguments* - -Different versions of Vi have different command-line arguments. This can be -confusing. To help you, this section gives an overview of the differences. - -Five variants of Vi will be considered here: - Elvis Elvis version 2.1b - Nvi Nvi version 1.79 - Posix Posix 1003.2 - Vi Vi version 3.7 (for Sun 4.1.x) - Vile Vile version 7.4 (incomplete) - Vim Vim version 5.2 - -Only Vim is able to accept options in between and after the file names. - -+{command} Elvis, Nvi, Posix, Vi, Vim: Same as "-c {command}". - -- Nvi, Posix, Vi: Run Ex in batch mode. - Vim: Read file from stdin (use -s for batch mode). - --- Vim: End of options, only file names are following. - ---cmd {command} Vim: execute {command} before sourcing vimrc files. - ---echo-wid Vim: GTK+ echoes the Window ID on stdout - ---help Vim: show help message and exit. - ---literal Vim: take file names literally, don't expand wildcards. - ---nofork Vim: same as -f - ---noplugin[s] Vim: Skip loading plugins. - ---remote Vim: edit the files in another Vim server - ---remote-expr {expr} Vim: evaluate {expr} in another Vim server - ---remote-send {keys} Vim: send {keys} to a Vim server and exit - ---remote-silent {file} Vim: edit the files in another Vim server if possible - ---remote-wait Vim: edit the files in another Vim server and wait for it - ---remote-wait-silent Vim: like --remote-wait, no complaints if not possible - ---role {role} Vim: GTK+ 2: set role of main window - ---serverlist Vim: Output a list of Vim servers and exit - ---servername {name} Vim: Specify Vim server name - ---socketid {id} Vim: GTK window socket to run Vim in - ---windowid {id} Vim: Win32 window ID to run Vim in - ---version Vim: show version message and exit. - --? Vile: print usage summary and exit. - --a Elvis: Load all specified file names into a window (use -o for - Vim). - --A Vim: Start in Arabic mode (when compiled with Arabic). - --b {blksize} Elvis: Use {blksize} blocksize for the session file. --b Vim: set 'binary' mode. - --C Vim: Compatible mode. - --c {command} Elvis, Nvi, Posix, Vim: run {command} as an Ex command after - loading the edit buffer. - Vim: allow up to 10 "-c" arguments - --d Vim: start with 'diff' set. |diff-mode| - --D Vim: debug mode. - --e Elvis, Nvi, Vim: Start in Ex mode. - --E Vim: Start in improved Ex mode |gQ|. - --f Vim: Run GUI in foreground. --f {session} Elvis: Use {session} as the session file. - --F Vim: Start in Farsi mode (when compiled with Farsi). - Nvi: Fast start, don't read the entire file when editing - starts. - --G {gui} Elvis: Use the {gui} as user interface. - --g Vim: Start GUI. --g N Vile: start editing at line N - --h Vim: Give help message. - Vile: edit the help file - --H Vim: start Hebrew mode (when compiled with it). - --i Elvis: Start each window in Insert mode. --i {viminfo} Vim: Use {viminfo} for viminfo file. - --L Vim: Same as "-r" (also in some versions of Vi). - --l Nvi, Vi, Vim: Set 'lisp' and 'showmatch' options. - --m Vim: Modifications not allowed to be written, resets 'write' - option. - --M Vim: Modifications not allowed, resets 'modifiable' and the - 'write' option. - --N Vim: No-compatible mode. - --n Vim: No swap file used. - --nb[args] Vim: open a NetBeans interface connection - --O[N] Vim: Like -o, but use vertically split windows. - --o[N] Vim: Open [N] windows, or one for each file. - --p[N] Vim: Open [N] tab pages, or one for each file. - --P {parent-title} Win32 Vim: open Vim inside a parent application window - --q {name} Vim: Use {name} for quickfix error file. --q{name} Vim: Idem. - --R Elvis, Nvi, Posix, Vile, Vim: Set the 'readonly' option. - --r Elvis, Nvi, Posix, Vi, Vim: Recovery mode. - --S Nvi: Set 'secure' option. --S {script} Vim: source script after starting up. - --s Nvi, Posix, Vim: Same as "-" (silent mode), when in Ex mode. - Elvis: Sets the 'safer' option. --s {scriptin} Vim: Read from script file {scriptin}; only when not in Ex - mode. --s {pattern} Vile: search for {pattern} - --t {tag} Elvis, Nvi, Posix, Vi, Vim: Edit the file containing {tag}. --t{tag} Vim: Idem. - --T {term} Vim: Set terminal name to {term}. - --u {vimrc} Vim: Read initializations from {vimrc} file. - --U {gvimrc} Vim: Read GUI initializations from {gvimrc} file. - --v Nvi, Posix, Vi, Vim: Begin in Normal mode (visual mode, in Vi - terms). - Vile: View mode, no changes possible. - --V Elvis, Vim: Verbose mode. --V{nr} Vim: Verbose mode with specified level. - --w {size} Elvis, Posix, Nvi, Vi, Vim: Set value of 'window' to {size}. --w{size} Nvi, Vi: Same as "-w {size}". --w {name} Vim: Write to script file {name} (must start with non-digit). - --W {name} Vim: Append to script file {name}. - --X Vim: Don't connect to the X server. - --Z Vim: restricted mode - -@{cmdfile} Vile: use {cmdfile} as startup file. - vim:tw=78:ts=8:ft=help:norl: |