1
- *starting.txt* For Vim version 8.0 . Last change: 2017 Jul 15
1
+ *starting.txt* For Vim version 8.1 . Last change: 2018 May 05
2
2
3
3
4
4
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -58,9 +58,9 @@ filename One or more file names. The first one will be the current
58
58
that is read from stdin. The commands that would normally be
59
59
read from stdin will now be read from stderr. Example: >
60
60
find . -name "*.c" -print | vim -
61
- < The buffer will be marked modified, because it contains text
62
- that needs to be saved. Except when in readonly mode, then
63
- the buffer is not marked modified . Example: >
61
+ < The buffer will not be marked as modified, so that it's easy
62
+ to exit. Be careful to mark it as modified if you don't want
63
+ to accidentally lose it . Example: >
64
64
ls | view -
65
65
<
66
66
Starting in Ex mode: >
@@ -127,7 +127,8 @@ argument.
127
127
On VMS all option arguments are assumed to be lowercase, unless preceded with
128
128
a slash. Thus "-R" means recovery and "-/R" readonly.
129
129
130
- --help *-h* *--help*
130
+ --help *-h* *--help* *-?*
131
+ -?
131
132
-h Give usage (help) message and exit. {not in Vi}
132
133
See | info-message | about capturing the text.
133
134
@@ -421,7 +422,9 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
421
422
*--not-a-term*
422
423
--not-a-term Tells Vim that the user knows that the input and/or output is
423
424
not connected to a terminal. This will avoid the warning and
424
- the two second delay that would happen. {not in Vi}
425
+ the two second delay that would happen.
426
+ Also avoids the "Reading from stdin..." message.
427
+ {not in Vi}
425
428
426
429
*--ttyfail*
427
430
--ttyfail When the stdin or stdout is not a terminal (tty) then exit
@@ -508,12 +511,14 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
508
511
{not in Vi}
509
512
510
513
*--clean*
511
- --clean Equal to "-u DEFAULTS -i NONE":
514
+ --clean Equal to "-u DEFAULTS -U NONE - i NONE":
512
515
- initializations from files and environment variables is
513
516
skipped
514
517
- the | defaults.vim | script is loaded, which implies
515
518
'nocompatible' : use Vim defaults
519
+ - no | gvimrc | script is loaded
516
520
- no viminfo file is read or written
521
+ - the home directory is excluded from 'runtimepath'
517
522
*-x*
518
523
-x Use encryption to read/write files. Will prompt for a key,
519
524
which is then stored in the 'key' option. All writes will
@@ -873,6 +878,9 @@ accordingly. Vim proceeds in this order:
873
878
(*) Using this file or environment variable will cause 'compatible' to be
874
879
off by default. See | compatible-default | .
875
880
881
+ Note: When using the | mzscheme | interface, it is initialized after loading
882
+ the vimrc file. Changing 'mzschemedll' later has no effect.
883
+
876
884
4. Load the plugin scripts. *load-plugins*
877
885
This does the same as the command: >
878
886
:runtime! plugin/**/*.vim
@@ -1005,14 +1013,13 @@ Vi compatible default value ~
1005
1013
When Vim starts, the 'compatible' option is on. This will be used when Vim
1006
1014
starts its initializations. But as soon as:
1007
1015
- a user vimrc file is found, or
1008
- - a vimrc file in the current directory, or
1016
+ - a vimrc file in the current directory is found , or
1009
1017
- the "VIMINIT" environment variable is set, or
1010
1018
- the "-N" command line argument is given, or
1011
1019
- the "--clean" command line argument is given, or
1012
- even when no vimrc file exists.
1013
1020
- the | defaults.vim | script is loaded, or
1014
- - gvimrc file was found,
1015
- then it will be set to 'nocompatible' .
1021
+ - a gvimrc file was found,
1022
+ then the option will be set to 'nocompatible' .
1016
1023
1017
1024
Note that this does NOT happen when a system-wide vimrc file was found.
1018
1025
@@ -1038,13 +1045,13 @@ giving the mapping.
1038
1045
Defaults without a .vimrc file ~
1039
1046
*defaults.vim*
1040
1047
If Vim is started normally and no user vimrc file is found, the
1041
- $VIMRUTIME /defaults.vim script is loaded. This will set 'compatible' off,
1048
+ $VIMRUNTIME /defaults.vim script is loaded. This will set 'compatible' off,
1042
1049
switch on syntax highlighting and a few more things. See the script for
1043
1050
details. NOTE: this is done since Vim 8.0, not in Vim 7.4. (it was added in
1044
1051
patch 7.4.2111 to be exact).
1045
1052
1046
1053
This should work well for new Vim users. If you create your own .vimrc, it is
1047
- recommended to add this line somewhere near the top: >
1054
+ recommended to add these lines somewhere near the top: >
1048
1055
unlet! skip_defaults_vim
1049
1056
source $VIMRUNTIME/defaults.vim
1050
1057
Then Vim works like before you had a .vimrc. Copying $VIMRUNTIME/vimrc_example
@@ -1415,7 +1422,7 @@ The output of ":mkview" contains these items:
1415
1422
5. The scroll position and the cursor position in the file. Doesn't work very
1416
1423
well when there are closed folds.
1417
1424
6. The local current directory, if it is different from the global current
1418
- directory.
1425
+ directory and 'viewoptions' contains "curdir" .
1419
1426
1420
1427
Note that Views and Sessions are not perfect:
1421
1428
- They don't restore everything. For example, defined functions, autocommands
@@ -1527,7 +1534,7 @@ Notes for Unix:
1527
1534
you have worked with.
1528
1535
- If you want to share the viminfo file with other users (e.g. when you "su"
1529
1536
to another user), you can make the file writable for the group or everybody.
1530
- Vim will preserve this when writing new viminfo files . Be careful, don't
1537
+ Vim will preserve this when replacing the viminfo file . Be careful, don't
1531
1538
allow just anybody to read and write your viminfo file!
1532
1539
- Vim will not overwrite a viminfo file that is not writable by the current
1533
1540
"real" user. This helps for when you did "su" to become root, but your
0 commit comments