runtime(doc): Recover some missed commas and periods in starting.txt

Also:

- Insert some missing words;
- Strive for consistency with capitalisation of words;
- Improve shell alias examples.

The gvim words were left alone for now, but they deserve to
be treated like proper names, GVim or GUI Vim, unless these
refer to executable filenames (on *nix systems).

closes: #14194

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Aliaksei Budavei
2024-03-18 19:24:52 +01:00
committed by Christian Brabandt
parent 4e334d0443
commit 78c189837a

View File

@ -1,4 +1,4 @@
*starting.txt* For Vim version 9.1. Last change: 2023 Oct 20 *starting.txt* For Vim version 9.1. Last change: 2024 Mar 13
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -113,10 +113,10 @@ Additional characters may follow, they are ignored. For example, you can have
"gvim-8" to start the GUI. You must have an executable by that name then, of "gvim-8" to start the GUI. You must have an executable by that name then, of
course. course.
On Unix, you would normally have one executable called Vim, and links from the On Unix, you would normally have one executable called "vim", and links from
different startup-names to that executable. If your system does not support the different startup-names to that executable. If your system does not
links and you do not want to have several copies of the executable, you could support links and you do not want to have several copies of the executable,
use an alias instead. For example: > you could use an alias instead. For example, in a C shell descendant: >
alias view vim -R alias view vim -R
alias gvim vim -g alias gvim vim -g
< <
@ -194,7 +194,7 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
--cmd {command} *--cmd* --cmd {command} *--cmd*
{command} will be executed before processing any vimrc file. {command} will be executed before processing any vimrc file.
Otherwise it acts like -c {command}. You can use up to 10 of Otherwise, it acts like -c {command}. You can use up to 10 of
these commands, independently from "-c" commands. these commands, independently from "-c" commands.
*-S* *-S*
@ -279,7 +279,7 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
*-s-ex* *-s-ex*
-s Silent or batch mode. Only when Vim was started as "ex" or -s Silent or batch mode. Only when Vim was started as "ex" or
when preceded with the "-e" argument. Otherwise see |-s|, when preceded with the "-e" argument. Otherwise, see |-s|,
which does take an argument while this use of "-s" doesn't. which does take an argument while this use of "-s" doesn't.
To be used when Vim is used to execute Ex commands from a file To be used when Vim is used to execute Ex commands from a file
instead of a terminal. Switches off most prompts and instead of a terminal. Switches off most prompts and
@ -289,12 +289,12 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
:list :list
:number :number
:set to display option values. :set to display option values.
When 'verbose' is non-zero messages are printed (for When 'verbose' is non-zero, messages are printed (for
debugging, to stderr). debugging, to stderr).
'term' and $TERM are not used. 'term' and $TERM are not used.
If Vim appears to be stuck try typing "qa!<Enter>". You don't If Vim appears to be stuck, try typing "qa!<Enter>". You
get a prompt thus you can't see Vim is waiting for you to type don't get a prompt, thus you can't see Vim is waiting for you
something. to type something.
Initializations are skipped (except the ones given with the Initializations are skipped (except the ones given with the
"-u" argument). "-u" argument).
Example: > Example: >
@ -317,7 +317,7 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
*-A* *-A*
-A Arabic mode. Sets the 'arabic' option on. {only when -A Arabic mode. Sets the 'arabic' option on. {only when
compiled with the |+arabic| features (which include compiled with the |+arabic| features (which include
|+rightleft|), otherwise Vim gives an error message |+rightleft|), otherwise, Vim gives an error message
and exits} and exits}
*-F* *-F*
@ -326,7 +326,7 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
*-H* *-H*
-H Hebrew mode. Sets the 'hkmap' and 'rightleft' options on. -H Hebrew mode. Sets the 'hkmap' and 'rightleft' options on.
{only when compiled with the |+rightleft| feature, otherwise {only when compiled with the |+rightleft| feature, otherwise,
Vim gives an error message and exits} Vim gives an error message and exits}
*-V* *verbose* *-V* *verbose*
@ -407,7 +407,7 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
few windows will be editing an empty file. few windows will be editing an empty file.
*-O* *-O*
-O[N] Open N windows, split vertically. Otherwise it's like -o. -O[N] Open N windows, split vertically. Otherwise, it's like -o.
If both the -o and the -O option are given, the last one on If both the -o and the -O option are given, the last one on
the command line determines how the windows will be split. the command line determines how the windows will be split.
@ -483,8 +483,10 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
This can be used to start Vim in a special mode, with special This can be used to start Vim in a special mode, with special
mappings and settings. A shell alias can be used to make mappings and settings. A shell alias can be used to make
this easy to use. For example: > this easy to use. For example, in a C shell descendant: >
alias vimc vim -u ~/.c_vimrc !* alias vimc 'vim -u ~/.c_vimrc \!*'
< And in a Bash shell: >
alias vimc='vim -u ~/.c_vimrc'
< Also consider using autocommands; see |autocommand|. < Also consider using autocommands; see |autocommand|.
When {vimrc} is equal to "NONE" (all uppercase), all When {vimrc} is equal to "NONE" (all uppercase), all
@ -544,9 +546,9 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
window title and copy/paste using the X clipboard. This window title and copy/paste using the X clipboard. This
avoids a long startup time when running Vim in a terminal avoids a long startup time when running Vim in a terminal
emulator and the connection to the X server is slow. emulator and the connection to the X server is slow.
See |--startuptime| to find out if affects you. See |--startuptime| to find out if this affects you.
Only makes a difference on Unix or VMS, when compiled with the Only makes a difference on Unix or VMS, when compiled with the
|+X11| feature. Otherwise it's ignored. |+X11| feature. Otherwise, it's ignored.
To disable the connection only for specific terminals, see the To disable the connection only for specific terminals, see the
'clipboard' option. 'clipboard' option.
When the X11 Session Management Protocol (XSMP) handler has When the X11 Session Management Protocol (XSMP) handler has
@ -575,8 +577,8 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
":source!". When the "scriptout" file already exists, new ":source!". When the "scriptout" file already exists, new
characters are appended. See also |complex-repeat|. characters are appended. See also |complex-repeat|.
{scriptout} cannot start with a digit. {scriptout} cannot start with a digit.
If you want to record what is typed in a human readable for If you want to record what is typed in a human readable form,
you can use |ch_logfile()|, It adds "raw key input" lines. you can use |ch_logfile()|. It adds "raw key input" lines.
Also see |--log|. Also see |--log|.
*-W* *-W*
@ -666,7 +668,7 @@ If the executable is called "ex", Vim will start in "Ex" mode. This means it
will accept only ":" commands. But when the "-v" argument is given, Vim will will accept only ":" commands. But when the "-v" argument is given, Vim will
start in Normal mode anyway. start in Normal mode anyway.
Additional arguments are available on unix like systems when compiled with Additional arguments are available on Unix like systems when compiled with
X11 GUI support. See |gui-resources|. X11 GUI support. See |gui-resources|.
============================================================================== ==============================================================================
@ -740,7 +742,7 @@ In Evim these options are changed from their default value:
:set incsearch show matches halfway typing a pattern :set incsearch show matches halfway typing a pattern
:set mouse=a use the mouse in all modes :set mouse=a use the mouse in all modes
:set hlsearch highlight all matches for a search pattern :set hlsearch highlight all matches for a search pattern
:set whichwrap+=<,>,[,] <Left> and <Right> wrap around line breaks :set whichwrap+=<,>,[,] <Left> and <Right> wrap around line breaks
:set guioptions-=a non-Unix only: don't do auto-select :set guioptions-=a non-Unix only: don't do auto-select
Key mappings: Key mappings:
@ -833,7 +835,7 @@ accordingly. Vim proceeds in this order:
initializations until 4. are skipped. Only the "-u" option is initializations until 4. are skipped. Only the "-u" option is
interpreted. interpreted.
*evim.vim* *evim.vim*
a. If vim was started as |evim| or |eview| or with the |-y| argument, the a. If Vim was started as |evim| or |eview| or with the |-y| argument, the
script $VIMRUNTIME/evim.vim will be loaded. script $VIMRUNTIME/evim.vim will be loaded.
*system-vimrc* *system-vimrc*
b. For Unix, MS-Windows, VMS, Macintosh and Amiga the system vimrc file b. For Unix, MS-Windows, VMS, Macintosh and Amiga the system vimrc file
@ -929,7 +931,7 @@ accordingly. Vim proceeds in this order:
This means that Vim will figure out the values of 'shellpipe' and This means that Vim will figure out the values of 'shellpipe' and
'shellredir' for you, unless you have set them yourself. 'shellredir' for you, unless you have set them yourself.
6. Set 'updatecount' to zero, if "-n" command argument used 6. Set 'updatecount' to zero, if "-n" command argument used.
7. Set binary options 7. Set binary options
If the "-b" flag was given to Vim, the options for binary editing will If the "-b" flag was given to Vim, the options for binary editing will
@ -973,7 +975,7 @@ Some hints on using initializations ~
Standard setup: Standard setup:
Create a vimrc file to set the default settings and mappings for all your edit Create a vimrc file to set the default settings and mappings for all your edit
sessions. Put it in a place so that it will be found by 3b: sessions. Put it in a place so that it will be found by 3b.:
~/.vimrc (Unix) ~/.vimrc (Unix)
s:.vimrc (Amiga) s:.vimrc (Amiga)
$VIM\_vimrc (Win32) $VIM\_vimrc (Win32)
@ -1087,11 +1089,11 @@ Avoiding trojan horses ~
*trojan-horse* *trojan-horse*
While reading the "vimrc" or the "exrc" file in the current directory, some While reading the "vimrc" or the "exrc" file in the current directory, some
commands can be disabled for security reasons by setting the 'secure' option. commands can be disabled for security reasons by setting the 'secure' option.
This is always done when executing the command from a tags file. Otherwise it This is always done when executing the command from a tags file. Otherwise,
would be possible that you accidentally use a vimrc or tags file that somebody it would be possible that you accidentally use a vimrc or tags file that
else created and contains nasty commands. The disabled commands are the ones somebody else created and contains nasty commands. The disabled commands are
that start a shell, the ones that write to a file, and ":autocmd". The ":map" the ones that start a shell, the ones that write to a file, and ":autocmd".
commands are echoed, so you can see which keys are being mapped. The ":map" commands are echoed, so you can see which keys are being mapped.
If you want Vim to execute all commands in a local vimrc file, you If you want Vim to execute all commands in a local vimrc file, you
can reset the 'secure' option in the EXINIT or VIMINIT environment variable or can reset the 'secure' option in the EXINIT or VIMINIT environment variable or
in the global "exrc" or "vimrc" file. This is not possible in "vimrc" or in the global "exrc" or "vimrc" file. This is not possible in "vimrc" or
@ -1248,9 +1250,9 @@ continue if you make it the foreground job again. On other systems, CTRL-Z
will start a new shell. This is the same as the ":sh" command. Vim will will start a new shell. This is the same as the ":sh" command. Vim will
continue if you exit from the shell. continue if you exit from the shell.
In X-windows the selection is disowned when Vim suspends. this means you In the X Window System environment, the selection is disowned when Vim
can't paste it in another application (since Vim is going to sleep an attempt suspends. This means you can't paste it in another application (since Vim is
to get the selection would make the program hang). going to sleep, an attempt to get the selection would make the program hang).
============================================================================== ==============================================================================
7. Exiting *exiting* 7. Exiting *exiting*
@ -1295,7 +1297,7 @@ will be set to the same values. The options 'columns', 'endofline',
dependent. Note that the options 'binary', 'paste' and 'readonly' are dependent. Note that the options 'binary', 'paste' and 'readonly' are
included, this might not always be what you want. included, this might not always be what you want.
When special keys are used in mappings, The 'cpoptions' option will be When special keys are used in mappings, the 'cpoptions' option will be
temporarily set to its Vim default, to avoid the mappings to be temporarily set to its Vim default, to avoid the mappings to be
misinterpreted. This makes the file incompatible with Vi, but makes sure it misinterpreted. This makes the file incompatible with Vi, but makes sure it
can be used with different terminals. can be used with different terminals.
@ -1356,8 +1358,8 @@ All this is {not available when compiled without the |+mksession| feature}.
*:mks* *:mksession* *:mks* *:mksession*
:mks[ession][!] [file] Write a Vim script that restores the current editing :mks[ession][!] [file] Write a Vim script that restores the current editing
session. session.
When [!] is included an existing file is overwritten. When [!] is included, an existing file is overwritten.
When [file] is omitted "Session.vim" is used. When [file] is omitted, "Session.vim" is used.
The output of ":mksession" is like ":mkvimrc", but additional commands are The output of ":mksession" is like ":mkvimrc", but additional commands are
added to the file. Which ones depends on the 'sessionoptions' option. The added to the file. Which ones depends on the 'sessionoptions' option. The
@ -1369,16 +1371,16 @@ resulting file, when executed with a ":source" command:
3. Closes all windows in the current tab page, except the current one; closes 3. Closes all windows in the current tab page, except the current one; closes
all tab pages except the current one (this results in currently loaded all tab pages except the current one (this results in currently loaded
buffers to be unloaded, some may become hidden if 'hidden' is set or buffers to be unloaded, some may become hidden if 'hidden' is set or
otherwise specified); wipes out the current buffer, if it is empty otherwise specified); wipes out the current buffer, if it is empty and
and unnamed. unnamed.
4. Restores the current directory if 'sessionoptions' contains "curdir", or 4. Restores the current directory, if 'sessionoptions' contains "curdir", or
sets the current directory to where the Session file is if 'sessionoptions' sets the current directory to where the Session file is, if
contains "sesdir". 'sessionoptions' contains "sesdir".
5. Restores GUI Vim window position, if 'sessionoptions' contains "winpos". 5. Restores GUI Vim window position, if 'sessionoptions' contains "winpos".
6. Restores screen size, if 'sessionoptions' contains "resize". 6. Restores screen size, if 'sessionoptions' contains "resize".
7. Reloads the buffer list, with the last cursor positions. If 7. Reloads the buffer list, with the last cursor positions. If
'sessionoptions' contains "buffers" then all buffers are restored, 'sessionoptions' contains "buffers" then all buffers are restored,
including hidden and unloaded buffers. Otherwise only buffers in windows including hidden and unloaded buffers. Otherwise, only buffers in windows
are restored. are restored.
8. Restores all windows with the same layout. If 'sessionoptions' contains 8. Restores all windows with the same layout. If 'sessionoptions' contains
"help", help windows are restored. If 'sessionoptions' contains "blank", "help", help windows are restored. If 'sessionoptions' contains "blank",
@ -1405,14 +1407,14 @@ A session includes all tab pages, unless "tabpages" was removed from
The |SessionLoadPost| autocmd event is triggered after a session file is The |SessionLoadPost| autocmd event is triggered after a session file is
loaded/sourced. loaded/sourced.
*SessionLoad-variable* *SessionLoad-variable*
While the session file is loading the SessionLoad global variable is set to 1. While the session file is loading, the SessionLoad global variable is set to
Plugins can use this to postpone some work until the SessionLoadPost event is 1. Plugins can use this to postpone some work until the SessionLoadPost event
triggered. is triggered.
*:mkvie* *:mkview* *:mkvie* *:mkview*
:mkvie[w][!] [file] Write a Vim script that restores the contents of the :mkvie[w][!] [file] Write a Vim script that restores the contents of the
current window. current window.
When [!] is included an existing file is overwritten. When [!] is included, an existing file is overwritten.
When [file] is omitted or is a number from 1 to 9, a When [file] is omitted or is a number from 1 to 9, a
name is generated and 'viewdir' prepended. When the name is generated and 'viewdir' prepended. When the
last path part of 'viewdir' does not exist, this last path part of 'viewdir' does not exist, this
@ -1427,14 +1429,13 @@ triggered.
The output of ":mkview" contains these items: The output of ":mkview" contains these items:
1. The argument list used in the window. When the global argument list is 1. The argument list used in the window. When the global argument list is
used it is reset to the global list. used, it is reset to the global list.
The index in the argument list is also restored. The index in the argument list is also restored.
2. The file being edited in the window. If there is no file, the window is 2. The file being edited in the window. If there is no file, the window is
made empty. made empty.
3. Restore mappings, abbreviations and options local to the window if 3. Restore mappings, abbreviations and options local to the window, if
'viewoptions' contains "options" or "localoptions". For the options it 'viewoptions' contains "options" or "localoptions". Only option values
restores only values that are local to the current buffer and values local that are local to the current buffer and the current window are restored.
to the window.
When storing the view as part of a session and "options" is in When storing the view as part of a session and "options" is in
'sessionoptions', global values for local options will be stored too. 'sessionoptions', global values for local options will be stored too.
4. Restore folds when using manual folding and 'viewoptions' contains 4. Restore folds when using manual folding and 'viewoptions' contains
@ -1468,7 +1469,7 @@ Note that Views and Sessions are not perfect:
The combination of ":mkview" and ":loadview" can be used to store up to ten The combination of ":mkview" and ":loadview" can be used to store up to ten
different views of a file. These are remembered in the directory specified different views of a file. These are remembered in the directory specified
with the 'viewdir' option. The views are stored using the file name. If a with the 'viewdir' option. The views are stored using the file name. If a
file is renamed or accessed through a (symbolic) link the view will not be file is renamed or accessed through a (symbolic) link, the view will not be
found. found.
You might want to clean up your 'viewdir' directory now and then. You might want to clean up your 'viewdir' directory now and then.
@ -1541,12 +1542,13 @@ always kept. This is used for:
- The search string history. - The search string history.
- The input-line history. - The input-line history.
- Contents of non-empty registers. - Contents of non-empty registers.
- The jump list - The jump list.
- File marks - File marks.
The timestamp feature was added before Vim 8.0. Older versions of Vim, The timestamp feature was added before Vim 8.0. Older versions of Vim,
starting with 7.4.1131, will keep the items with timestamp, but not use them. starting with 7.4.1131, will keep the items with timestamp, but not use them.
Thus when using both an older and a newer version of Vim the most recent data Thus, when using both an older and a newer version of Vim, the most recent
will be kept. data will be kept.
Notes for Unix: Notes for Unix:
- The file protection for the viminfo file will be set to prevent other users - The file protection for the viminfo file will be set to prevent other users
@ -1558,7 +1560,7 @@ Notes for Unix:
allow just anybody to read and write your viminfo file! allow just anybody to read and write your viminfo file!
- Vim will not overwrite a viminfo file that is not writable by the current - Vim will not overwrite a viminfo file that is not writable by the current
"real" user. This helps for when you did "su" to become root, but your "real" user. This helps for when you did "su" to become root, but your
$HOME is still set to a normal user's home directory. Otherwise Vim would $HOME is still set to a normal user's home directory. Otherwise, Vim would
create a viminfo file owned by root that nobody else can read. create a viminfo file owned by root that nobody else can read.
- The viminfo file cannot be a symbolic link. This is to avoid security - The viminfo file cannot be a symbolic link. This is to avoid security
issues. issues.
@ -1590,11 +1592,11 @@ using this command: >
vim -c "normal '0" vim -c "normal '0"
In a csh compatible shell you could make an alias for it: > In a C shell descendant, you could make an alias for it: >
alias lvim vim -c '"'normal "'"0'"' alias lvim vim -c '"'normal "'"0'"'
For a bash-like shell: > For a Bash-like shell: >
alias lvim='vim -c "normal '\''0"' alias lvim='vim -c "normal '\''0"'
@ -1639,14 +1641,14 @@ MANUALLY READING AND WRITING *viminfo-read-write*
Two commands can be used to read and write the viminfo file manually. This Two commands can be used to read and write the viminfo file manually. This
can be used to exchange registers between two running Vim programs: First can be used to exchange registers between two running Vim programs: First
type ":wv" in one and then ":rv" in the other. Note that if the register type ":wv" in one and then ":rv" in the other. Note that if the register
already contained something, then ":rv!" would be required. Also note already contained something, then ":rv!" would be required. Also note,
however that this means everything will be overwritten with information from however, that this means everything will be overwritten with information from
the first Vim, including the command line history, etc. the first Vim, including the command line history, etc.
The viminfo file itself can be edited by hand too, although we suggest you The viminfo file itself can be edited by hand too, although we suggest you
start with an existing one to get the format right. It is reasonably start with an existing one to get the format right. It is reasonably
self-explanatory once you're in there. This can be useful in order to self-explanatory once you're in there. This can be useful in order to
create a second file, say "~/.my_viminfo" which could contain certain create a second file, say "~/.my_viminfo", which could contain certain
settings that you always want when you first start Vim. For example, you settings that you always want when you first start Vim. For example, you
can preload registers with particular data, or put certain commands in the can preload registers with particular data, or put certain commands in the
command line history. A line in your .vimrc file like > command line history. A line in your .vimrc file like >
@ -1670,7 +1672,7 @@ most of the information will be restored).
|viminfo-file-name| above). |viminfo-file-name| above).
If [!] is given, then any information that is If [!] is given, then any information that is
already set (registers, marks, |v:oldfiles|, etc.) already set (registers, marks, |v:oldfiles|, etc.)
will be overwritten will be overwritten.
*:wv* *:wviminfo* *E137* *E138* *E574* *E886* *E929* *:wv* *:wviminfo* *E137* *E138* *E574* *E886* *E929*
:wv[iminfo][!] [file] Write to viminfo file [file] (default: see :wv[iminfo][!] [file] Write to viminfo file [file] (default: see
@ -1682,10 +1684,10 @@ most of the information will be restored).
the old information is not read first, only the the old information is not read first, only the
internal info is written. If 'viminfo' is empty, marks internal info is written. If 'viminfo' is empty, marks
for up to 100 files will be written. for up to 100 files will be written.
When you get error "E929: Too many viminfo temp files" When you get error "E929: Too many viminfo temp
check that no old temp files were left behind (e.g. files", check that no old temp files were left behind
~/.viminf*) and that you can write in the directory of (e.g. ~/.viminf*) and that you can write in the
the .viminfo file. directory of the .viminfo file.
*:ol* *:oldfiles* *:ol* *:oldfiles*
:ol[dfiles] List the files that have marks stored in the viminfo :ol[dfiles] List the files that have marks stored in the viminfo
@ -1703,7 +1705,7 @@ most of the information will be restored).
the list is edited. the list is edited.
If you get the |press-enter| prompt you can press "q" If you get the |press-enter| prompt you can press "q"
and still get the prompt to enter a file number. and still get the prompt to enter a file number.
Use ! to abandon a modified buffer. |abandon| Use [!] to abandon a modified buffer. |abandon|
{not when compiled with tiny features} {not when compiled with tiny features}
vim:tw=78:ts=8:noet:ft=help:norl: vim:tw=78:ts=8:noet:ft=help:norl: