diff options
author | Jason Downs <downsj@cvs.openbsd.org> | 1996-09-22 01:18:21 +0000 |
---|---|---|
committer | Jason Downs <downsj@cvs.openbsd.org> | 1996-09-22 01:18:21 +0000 |
commit | 80eddc88a7f881b7952a49a23f25677f09e6b4ba (patch) | |
tree | e8bff9fae669ff7d0df46d220225e67dd7927d49 /usr.bin/vim/doc | |
parent | 668eaf227d07b7361ec35e886a1de97ad5188c55 (diff) |
Add ex mode to vim, from eric@rainbow.uchicago.edu via mool@oce.nl.
Diffstat (limited to 'usr.bin/vim/doc')
-rw-r--r-- | usr.bin/vim/doc/vim_40.txt | 43 | ||||
-rw-r--r-- | usr.bin/vim/doc/vim_diff.txt | 17 | ||||
-rw-r--r-- | usr.bin/vim/doc/vim_help.txt | 1 | ||||
-rw-r--r-- | usr.bin/vim/doc/vim_idx.txt | 14 | ||||
-rw-r--r-- | usr.bin/vim/doc/vim_ref.txt | 86 | ||||
-rw-r--r-- | usr.bin/vim/doc/vim_tags | 3 |
6 files changed, 114 insertions, 50 deletions
diff --git a/usr.bin/vim/doc/vim_40.txt b/usr.bin/vim/doc/vim_40.txt index 6d4e1ba7a4c..8a9e986b2a2 100644 --- a/usr.bin/vim/doc/vim_40.txt +++ b/usr.bin/vim/doc/vim_40.txt @@ -28,6 +28,7 @@ INCOMPATIBLE CHANGES |Incompatible_changes| 'tildeop' and 'weirdinvert' short names changed |short_name_changed| Use of "v", "V" and "CTRL-V" in Visual mode |use_visual_cmds| CTRL-B in Insert mode removed |toggle_revins| + Q command changed to "gq" |Q_renamed| NEW AND IMPROVED FEATURES |new_features| New on-line help system |new_help| @@ -49,6 +50,7 @@ NEW AND IMPROVED FEATURES |new_features| Support for Windows NT and Windows 95 |new_win32| Support for OS/2 |new_os2| Support for MiNT |new_mint| + Ex mode commands added |new_ex| Miscellaneous |new_misc| VI COMPATIBILITY IMPROVEMENTS |vi_compat| @@ -401,6 +403,13 @@ this and accidentally hit CTRL-B, it is very difficult to find out how to undo it. Since hardly anybody uses this feature, it is disabled by default. If you want to use it, define RIGHTLEFT in feature.h before compiling. |'revins'| +Q command in normal mode renamed to "gq" *Q_renamed* +---------------------------------------- + +The Q command was used in vim 3.0 to rewrap paragraphs, but in standard vi +Q is the command to switch from "visual" mode to "ex" mode, and vim now has +an "ex" mode. + NEW AND IMPROVED FEATURES *new_features* ========================= @@ -729,8 +738,8 @@ Moved initialization of 'shellpipe' and 'shellredir' to after other initializations, so that they work correctly when 'shell' option is set. |'shellpipe'| -Added '2' to 'formatoptions': 'Q' will keep the indent of the second line of a -paragraph. |'formatoptions'| +Added '2' to 'formatoptions': 'gq' (formerly Q) will keep the indent of the +second line of a paragraph. |'formatoptions'| Added 'maxmapdepth' option: maximum recursiveness of mapping. |'maxmapdepth'| @@ -1024,7 +1033,7 @@ this port quite easy. It mostly uses the Unix files and settings. |vim_os2.txt| -Support for MiNT *new_mint* +Support for MiNT *new_mint* ---------------- There is now a version of Vim for MiNT. It was compiled with gcc under @@ -1032,6 +1041,14 @@ a Unix-like environment. |vim_mint.txt| +Ex mode commands added *new_ex* +---------------------- + +Vim now works in Ex mode when invoked as "ex" or when the Q command is +used. The :append, :change, :insert, and :z commands now function like +standard vi. + + Miscellaneous new features *new_misc* -------------------------- @@ -1133,22 +1150,22 @@ insert is still possible. |'revins'| Added "gq" as an alias to "Q". The "Q" command will be changed in a following version of Vim, to make it Vi compatible (start Ex mode). |gq| -The "Q" operator no longer affects empty lines. You can now format a lot of -paragraphs without losing the separating blank lines. Use "Qp..." to format a -few consecutive paragraphs. |Q| +The "gq" operator (formerly Q) no longer affects empty lines. You can now +format a lot of paragraphs without losing the separating blank lines. Use +"gqp..." to format a few consecutive paragraphs. |gq| -Formatting with "Q" fixes up the indent of the first line (replace with -minimal number of tabs/spaces). |Q| +Formatting with "gq" fixes up the indent of the first line (replace with +minimal number of tabs/spaces). |gq| -After "Q", put cursor at first non-blank of the last formatted line. This +After "gq", put cursor at first non-blank of the last formatted line. This makes it easier to repeat the formatting. -Made "Q}" put the cursor on the line after the paragraph (where the "}" +Made "gq}" put the cursor on the line after the paragraph (where the "}" command would have taken the cursor). Makes it possible to use "." to format -the next paragraph. |Q| +the next paragraph. |gq| -When formatting with "Q" while 'tw' and 'wm' are both zero, use a textwidth of +When formatting with "gq" while 'tw' and 'wm' are both zero, use a textwidth of 79, or the screen width minus one if that is smaller. Joining all the lines -doesn't make sense for the "Q" command. |Q| +doesn't make sense for the "gq" command. |gq| Added CTRL-W CTRL-T (go to top window) and CTRL-W CTRL-B (go to bottom window). |CTRL-W_CTRL-T|. diff --git a/usr.bin/vim/doc/vim_diff.txt b/usr.bin/vim/doc/vim_diff.txt index f9f0553718d..654fff63343 100644 --- a/usr.bin/vim/doc/vim_diff.txt +++ b/usr.bin/vim/doc/vim_diff.txt @@ -3,9 +3,8 @@ This is a summary of the differences between VIM and vi. It is not complete. see also |vim_ref.txt|, look for comments in {}, like "{not in Vi}". -Vim is mostly POSIX 1003.2-1 compliant. The commands known to be missing -are "Q", ":append", ":change", ":insert", ":open" and ":z". There are -probably a lot of small differences. +Vim is mostly POSIX 1003.2-1 compliant. The only command known to be missing +is ":open". There are probably a lot of small differences. THE MOST INTERESTING ADDITIONS @@ -77,7 +76,6 @@ Visual mode. |Visual_mode| ! filter through external program = filter through indent : start ":" command for the Visual lines. - Q format text to 'textwidth' columns (obsolete) gq format text to 'textwidth' columns J join lines ~ swap case @@ -321,6 +319,11 @@ Support for Windows 95/NT |new_win32| runs under Windows 3.1 and MS-DOS. It supports long file names where available. +Ex mode |new_ex| + You now get Ex mode when you invoke vim as "ex" or use the |Q| + command. The |:append|, |:insert|, |:change|, and |:z| commands + now function like in standard vi. + Miscellaneous new features |new_misc| Implemented incremental search. A whole bunch of commands that start with "g": Goto declaration, show @@ -329,7 +332,7 @@ Miscellaneous new features |new_misc| Added the ":retab" command. Can be used to change the size of a <Tab>, replace spaces with a <Tab> or a <Tab> with spaces. Implemented "Vim -r" to list any swap files that can be found. - The "Q" operator no longer affects empty lines. + The "gq" operator no longer affects empty lines. Added '-' register for deletes of less than one line, see |registers|. Quickfix: Support for several error formats at the same time. Added separate mapping for normal mode and visual mode. @@ -380,7 +383,6 @@ The "-o" option opens a window for each argument. "-o4" opens four windows. In command mode: -Missing command: "Q" (go to Ex mode) (but see |pseudo-Q|). Missing Ex commands: append, change, insert, open and z. The command characters are shown in the last line of the screen. They are @@ -556,6 +558,9 @@ 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. +The "Q" operator has been renamed to "gq" so that the "Q" command can switch +to "ex" mode. + In insert mode: diff --git a/usr.bin/vim/doc/vim_help.txt b/usr.bin/vim/doc/vim_help.txt index 70989e96d14..ea2d5d6d27b 100644 --- a/usr.bin/vim/doc/vim_help.txt +++ b/usr.bin/vim/doc/vim_help.txt @@ -803,6 +803,7 @@ Short explanation of each option: *option_list* C4350, etc.) |:normal| :norm[al][!] {commands} Execute Normal mode commands. +|Q| Q switch to "ex" mode. ------------------------------------------------------------------------------ *X_ce* Command-line editing diff --git a/usr.bin/vim/doc/vim_idx.txt b/usr.bin/vim/doc/vim_idx.txt index 83c82b06b3e..f7f28c96c2e 100644 --- a/usr.bin/vim/doc/vim_idx.txt +++ b/usr.bin/vim/doc/vim_idx.txt @@ -275,7 +275,7 @@ tag char note action in Normal mode insert text, repeat N times |P| ["x]P 2 put the text [from buffer x] before the cursor N times -|Q| Q{motion} 2 format Nmove lines (obsolete) +|Q| Q switch to "ex" mode |R| R 2 enter replace mode: overtype existing characters, repeat the entered text N-1 times @@ -588,7 +588,7 @@ tag char note action in Normal mode lines down |gk| gk 1 like "k", but when 'wrap' on go N screen lines up -|gq| gq{motion} 2 format Nmove text (same as "Q") +|gq| gq{motion} 2 format Nmove text |gs| gs goto sleep for N seconds (default 1) |gu| gu{motion} 2 make Nmove text lowercase |gv| gv reselect the previous Visual area @@ -752,7 +752,7 @@ arguments. |:@| :@ execute contents of a register |:@@| :@@ repeat the previous ":@" |:Next| :N[ext] go to previous file in the argument list -|:append| :a[ppend] append text (not implemented) +|:append| :a[ppend] append text |:abbreviate| :ab[breviate] enter abbreviation |:abclear| :abc[lear] remove all abbreviations |:all| :al[l] open a window for each file in the argument @@ -774,7 +774,7 @@ arguments. |:brewind| :br[ewind] go to last file in the buffer list |:buffers| :buffers list all files in the buffer list |:bunload| :bun[load] unload a specific buffer -|:change| :c[hange] replace a line (not implemented) +|:change| :c[hange] replace a line or series of lines |:cNext| :cN[ext] go to previous error |:cabbrev| :ca[bbrev] like ":abbreviate" but for command-line mode |:cabclear| :cabc[lear] clear all abbreviations for command-line mode @@ -814,7 +814,7 @@ arguments. |:gui| :gu[i] start the GUI |:gvim| :gv[im] start the GUI |:help| :h[elp] open a help window -|:insert| :i[nsert] insert text (not implemented) +|:insert| :i[nsert] insert text |:iabbrev| :ia[bbrev] like ":abbrev" but for Insert mode |:iabclear| :iabc[lear] like ":abclear" but for Insert mode |:ijump| :ij[ump] jump to definition of identifier @@ -926,7 +926,7 @@ arguments. |:unmap| :unm[ap] remove mapping |:version| :ve[rsion] print version number and other info |:vglobal| :v[global] execute commands for not matching lines -|:visual| :vi[sual] same as ":edit" +|:visual| :vi[sual] same as ":edit", but turns off "ex" mode. |:view| :vie[w] edit a file read-only |:vmap| :vm[ap] like ":map" but for Visual mode |:vmapclear| :vmapc[lear] remove all mappings for Visual mode @@ -946,5 +946,5 @@ arguments. |:xit| :x[it] write if buffer changed and quit window or Vim |:xall| :xa[ll] same as ":wqall" |:yank| :y[ank] yank lines into a register -|:z| :z print some lines (not implemented) +|:z| :z print some lines |:~| :~ repeat last ":substitute" diff --git a/usr.bin/vim/doc/vim_ref.txt b/usr.bin/vim/doc/vim_ref.txt index ad163ba4c79..72a1ffb15a8 100644 --- a/usr.bin/vim/doc/vim_ref.txt +++ b/usr.bin/vim/doc/vim_ref.txt @@ -442,8 +442,9 @@ Example for using a script file to change a name in several files: foreach i ( *.let ) vim -s subs.vi $i If the executable is called "view", Vim will start in Readonly mode. This is -useful if you can make a hard or symbolic link from "view" to "vim". -Starting in Readonly mode can also be done with "vim -v". +useful if you can make a hard or symbolic link from "view" to "vim". Starting +in Readonly mode can also be done with "vim -v". If the executable is called +"ex", Vim will start in Ex mode rather than visual mode. 3.2 Workbench (Amiga only) *workbench* @@ -2585,9 +2586,10 @@ the string "[Modified]" if the buffer has been changed. *:ex* :ex [+cmd] [file] Same as :edit. {Vi: go from visual to Ex mode} + Use the |Q| command to switch to Ex mode. *:vi* *:visual* -:vi[sual] [+cmd] [file] Same as :edit. {Vi: go from Ex to visual mode} +:vi[sual] [+cmd] [file] Same as :edit, but also go from Ex to visual mode. *:vie* *:view* :vie[w] [+cmd] file Same as :edit, but set 'readonly' option for this @@ -3574,7 +3576,6 @@ or change text. The following operators are available: |gU| gU make upper case |!| ! filter through an external program |=| = filter through 'equalprg' or C-indenting if empty - |Q| Q text formatting (obsolete) |gq| gq text formatting |>| > shift right |<| < shift left @@ -3781,6 +3782,29 @@ or the last line. The first two commands put the cursor in the same column except after the "$" command, then the cursor will be put on the last character of the line. + *:z* +:{range}z[+-^.=]{count} Display several lines of text surrounding the line + specified with {range}, or around the current line + if there is no {range}. If there is a {count}, that's + how many lines you'll see; otherwise, the current + window size is used. + + :z can be used either alone or followed by any of + several punctuation marks. These have the following + effect: + + mark first line last line new location + ---- ---------- --------- ------------ + + current line 1 scr forward 1 scr forward + - 1 scr back current line current line + ^ 2 scr back 1 scr back 1 scr back + . 1/2 scr back 1/2 scr fwd 1/2 src fwd + = 1/2 src back 1/2 scr fwd current line + + Specifying no mark at all is the same as "+". + If the mark is "=", a line of dashes is printed + around the current line. + 6.3 Word motions *word_motions* @@ -5175,6 +5199,18 @@ This command reads "binfile", uuencodes it and reads it into the current buffer. Useful when you are editing e-mail and want to include a binary file. + *:a* *:append* +:{range}a[ppend] Insert several lines of text below the specified + line. Type a line containing only "." to stop + inserting. If the {range} is missing, the text + will be inserted after the current line. + + *:i* *:insert* +:{range}a[ppend] Insert several lines of text above the specified + line. Type a line containing only "." to stop + inserting. If the {range} is missing, the text + will be inserted before the current line. + 10. Deleting text *deleting* ================= @@ -5333,6 +5369,12 @@ word does not include the following white space. {Vi: "cw" when on a blank followed by other blanks changes only the first blank; this is probably a bug, because "dw" deletes all the blanks} + *:c* *:change* +:{range}c[hange] Replace lines of text with some different text. + Type a line containing only "." to stop replacing. + If the {range} is missing, the current line will + be replaced with the new text. + 11.2 Simple changes *simple_change* @@ -5681,19 +5723,15 @@ either the first or second pattern in parentheses did not match, so either :[range]le[ft] [indent] left align lines in [range]. Sets the indent in the lines to [indent] (default 0). {not in Vi} -gq{motion} *Q* *gq* -Q{motion} Format the lines that were moved over. The length of + *gq* +gq{motion} Format the lines that were moved over. The length of each line will be restricted to the width given with the 'textwidth' option. See below. If the 'textwidth' option is 0, the width of the screen is used (with a maximum of 79). {not in Vi} - NOTE: The "Q" command is used in Vi to go to Ex mode. - In a future version of Vim this will be made - compatible. Use "gq" for formatting now, to avoid - problems when upgrading to a newer version of Vim. -{Visual}gq *v_Q* *v_gq* -{Visual}Q Format the highlighted text. (see the chapter on + *v_gq* +{Visual}gq Format the highlighted text. (see the chapter on Visual mode |Visual_mode|). {not in Vi} Example: To format the current paragraph use "gqp". @@ -5797,10 +5835,10 @@ r Automatically insert the current comment leader after hitting <return> in insert mode. o Automatically insert the current comment leader after hitting 'o' or 'O' in Normal mode. -q Allow formatting of comments with "gq" (or "Q", which is obsolete). - Note that blank lines, or lines containing only the comment leader - will be left untouched. A new paragraph starts after such a line, or - when the comment leader changes. +q Allow formatting of comments with "gq". Note that blank lines, or + lines containing only the comment leader will be left untouched. A + new paragraph starts after such a line, or when the comment leader + changes. 2 When formatting text the indent of the second line of a paragraph is used for the rest of the paragraph. This allows for paragraphs with a different indent for the first line. @@ -6419,7 +6457,6 @@ The operators that can be used are: < shift left (1)(*) |v_<| ! filter through external command (1) |v_!| = filter through 'equalprg' option command (1) |v_=| - Q format lines to 'textwidth' length (1)(obsolete)|v_Q| gq format lines to 'textwidth' length (1) |v_gq| The objects that can be used are: @@ -6622,6 +6659,15 @@ K Run a program to lookup the keyword under the sleep". While sleeping the cursor is positioned in the text (if visible). {not in Vi} + *Q* +Q Switch to "ex" mode. This is just like typing ":" + commands one after another, except you don't have to + keep pressing ":" and the screen doesn't get updated + after each command. Use the |:visual| command to + return to the normal visual editor. Vim will enter + this mode by default if it's invoked as "ex" on the + command line. + 15. Repeating commands *repeating* ====================== @@ -9908,13 +9954,7 @@ are included. However, there is no Ex mode. These commands are in Vi, but not in Vim. -Q {Vi: go to Ex mode} See |pseudo-Q|. - -:a[ppend] {Vi: append text} *:a* *:append* -:c[hange] {Vi: replace lines} *:c* *:change* -:i[nsert] {Vi: insert text} *:i* *:insert* :o[pen] {Vi: start editing in open mode}*:o* *:open* -:z {Vi: print some lines} *:z* 21.2 Missing options *missing_options* diff --git a/usr.bin/vim/doc/vim_tags b/usr.bin/vim/doc/vim_tags index a58adfe8025..6af387cac7e 100644 --- a/usr.bin/vim/doc/vim_tags +++ b/usr.bin/vim/doc/vim_tags @@ -1202,6 +1202,7 @@ N<Del> vim_ref.txt /\*N<Del>\* O vim_ref.txt /\*O\* P vim_ref.txt /\*P\* Q vim_ref.txt /\*Q\* +Q_renamed vim_40.txt /\*Q_renamed\* R vim_ref.txt /\*R\* S vim_ref.txt /\*S\* SHELL vim_ref.txt /\*SHELL\* @@ -1650,6 +1651,7 @@ new_autocmd vim_40.txt /\*new_autocmd\* new_cindent vim_40.txt /\*new_cindent\* new_commandline vim_40.txt /\*new_commandline\* new_complete vim_40.txt /\*new_complete\* +new_ex vim_40.txt /\*new_ex\* new_features vim_40.txt /\*new_features\* new_gui vim_40.txt /\*new_gui\* new_help vim_40.txt /\*new_help\* @@ -1898,7 +1900,6 @@ v_D vim_ref.txt /\*v_D\* v_J vim_ref.txt /\*v_J\* v_K vim_ref.txt /\*v_K\* v_P vim_ref.txt /\*v_P\* -v_Q vim_ref.txt /\*v_Q\* v_R vim_ref.txt /\*v_R\* v_S vim_ref.txt /\*v_S\* v_U vim_ref.txt /\*v_U\* |