Skip to content

Commit 94ef71c

Browse files
committed
Update starting from Vim 8.0 to 8.1
1 parent 0df0555 commit 94ef71c

File tree

2 files changed

+44
-30
lines changed

2 files changed

+44
-30
lines changed

doc/starting.jax

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*starting.txt* For Vim バージョン 8.0. Last change: 2017 Jul 15
1+
*starting.txt* For Vim バージョン 8.1. Last change: 2018 May 05
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -57,9 +57,9 @@ filename 1つ以上のファイル名が与えられた場合。まずは最初
5757
ドを使用するとまず標準入力を読み込み、それから標準エラー出力を
5858
読み込む。例: >
5959
find . -name "*.c" -print | vim -
60-
< バッファには未保存のテキストが含まれるので、「変更(modified)」
61-
のマークがつけられる。ただし読み込み専用モードで起動する場合は
62-
除く。例: >
60+
< 簡単に終了できるよう、バッファに「変更(modified)」のマークは付
61+
けられない。バッファの内容を思いがけず失いたくない場合は、変更
62+
とマークするよう心がけなさい。例: >
6363
ls | view -
6464
<
6565
Exモードで起動する場合: >
@@ -124,7 +124,8 @@ UNIXでは通常、Vimという名前の実行可能ファイルが一つあり
124124
VMSでは全てのオプション引数は小文字であるとみなされる。大文字を指定するにはス
125125
ラッシュを前に置く。つまり "-R" でリカバリモード、"-/R" で読み込み専用となる。
126126

127-
--help *-h* *--help*
127+
--help *-h* *--help* *-?*
128+
-?
128129
-h 使用法(ヘルプ)を表示して終了する。{Vi にはない}
129130
そのテキストを保存するには|info-message|を参照。
130131

@@ -419,7 +420,9 @@ VMSでは全てのオプション引数は小文字であるとみなされる
419420
*--not-a-term*
420421
--not-a-term 入力と出力(もしくはどちらか一方)が端末に接続されていないと、
421422
ユーザーが知っていることをVimに伝える。これにより警告が表示さ
422-
れ2秒間の遅延が発生するのを避けられる。{Vi にはない}
423+
れ2秒間の遅延が発生するのを避けられる。
424+
"Reading from stdin..." のメッセージを避けることもできる。
425+
{Vi にはない}
423426

424427
*--ttyfail*
425428
--ttyfail 標準入力か標準出力が端末(tty)でない場合、すぐに終了する。
@@ -499,11 +502,13 @@ VMSでは全てのオプション引数は小文字であるとみなされる
499502
{Vi にはない}
500503

501504
*--clean*
502-
--clean "-u DEFAULTS -i NONE" と同じ:
505+
--clean "-u DEFAULTS -U NONE -i NONE" と同じ:
503506
- ファイルや環境変数からの初期化はスキップされる。
504507
- |defaults.vim| スクリプトが読み込まれる。これは
505508
'nocompatible' を含む: Vim のデフォルトを使う。
509+
- |gvimrc| スクリプトは読み込まれない。
506510
- viminfo ファイルは読み書きされない。
511+
- ホームディレクトリは 'runtimepath' から除外される。
507512
*-x*
508513
-x ファイルの読み書き時に暗号化を施す。暗号の鍵としてオプション
509514
'key' に設定された値を使用する。全ての書き込みは、テキストに対
@@ -851,6 +856,9 @@ Evimでは以下のオプションが標準設定から変更される:
851856
(*) このファイルを使用するか環境変数を使用した場合、自動的に 'compatible'
852857
オプションがオフに設定される。|compatible-default|を参照。
853858

859+
Note: |mzscheme| インターフェイスを使用する場合は、vimrc ファイルの読み込
860+
みの後に初期化される。それより後に 'mzschemedll' を変更しても効果はない。
861+
854862
4. プラグインスクリプトを読み込む *load-plugins*
855863
次のコマンドと同じことを実行する: >
856864
:runtime! plugin/**/*.vim
@@ -979,7 +987,6 @@ Vim が起動すると、オプション 'compatible' がオンに設定され
979987
- 環境変数 "VIMINIT" が設定されている
980988
- 起動引数 "-N" が指定されている
981989
- 起動引数 "--clean" が指定されている
982-
これは vimrc ファイルが無くても機能する
983990
- |defaults.vim| がロードされる
984991
- gvimrc が見つかる
985992

@@ -1004,10 +1011,10 @@ Vim 起動時に 'compatible' の値に起こるのと同様の作用となる
10041011
.vimrc ファイルが無い際のデフォルト ~
10051012
*defaults.vim*
10061013
Vim を普通に起動してユーザー vimrc ファイルが見つからない場合には、
1007-
$VIMRUTIME/defaults.vim スクリプトが読みこまれる。このスクリプトは'compatible'
1008-
をオフにし、シンタックスハイライトを有効にする他、幾つかのことを実施する。詳細
1009-
はそのスクリプトを参照せよ。NOTE: これは正確には Vim 8.0 からではなく 7.4.2111
1010-
から導入された
1014+
$VIMRUNTIME/defaults.vim スクリプトが読みこまれる。このスクリプトは
1015+
'compatible'をオフにし、シンタックスハイライトを有効にする他、幾つかのことを実
1016+
施する。詳細はそのスクリプトを参照せよ。NOTE: これは正確には Vim 8.0 からでは
1017+
なく 7.4.2111から導入された
10111018

10121019
これはVimの新規ユーザーにとって良く機能する。自分で .vimrc を作る際には、その
10131020
最上部のほうに以下の2行を追加することが推奨される: >
@@ -1383,7 +1390,7 @@ Note: .vimrcファイルを作成するときにはオプション 'compatible'
13831390
5. ファイルにおけるカーソルとスクロールの位置を復元する。閉じた折畳みがあると
13841391
うまく機能しない。
13851392
6. ローカルなカレントディレクトリを復元する。グローバルなカレントディレクトリ
1386-
と違っている場合のみ
1393+
と違っている場合、かつ 'viewoptions' が "curdir" を含んでいる場合のみ
13871394
{訳注: |current-directory|}
13881395

13891396
Note: ビューとセッションは完璧ではない:
@@ -1494,8 +1501,8 @@ Note: Unixにおける注意点:
14941501
で、他人に覗かれないように保護(パーミッション設定)したほうが良い。
14951502
- 複数のユーザーでviminfoファイルを共有したい時(例えば他のユーザーへ "su" する
14961503
時など)には、グループもしくは全員にviminfoファイルへの書き込み権限を与える。
1497-
Vimが新しくviminfoファイルを保存するときに、その設定を維持する。しかし、誰に
1498-
でもviminfoファイルを読ませたり書かせたりすべきではないし、注意が必要。
1504+
Vimがviminfoファイルを置き換えるときに、その設定を維持する。しかし、誰にでも
1505+
viminfoファイルを読ませたり書かせたりすべきではないし、注意が必要。
14991506
- 現在の "本当" のユーザーによって書き込み不能なviminfoファイルは、Vimは決して
15001507
上書きしない。これは "su" でrootユーザーになった時、しかし$HOMEがまだ通常ユー
15011508
ザーのホームディレクトリのままの時の支援となる。そうでないとVimはroot所有の、

en/starting.txt

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -58,9 +58,9 @@ filename One or more file names. The first one will be the current
5858
that is read from stdin. The commands that would normally be
5959
read from stdin will now be read from stderr. Example: >
6060
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: >
6464
ls | view -
6565
<
6666
Starting in Ex mode: >
@@ -127,7 +127,8 @@ argument.
127127
On VMS all option arguments are assumed to be lowercase, unless preceded with
128128
a slash. Thus "-R" means recovery and "-/R" readonly.
129129

130-
--help *-h* *--help*
130+
--help *-h* *--help* *-?*
131+
-?
131132
-h Give usage (help) message and exit. {not in Vi}
132133
See |info-message| about capturing the text.
133134

@@ -421,7 +422,9 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
421422
*--not-a-term*
422423
--not-a-term Tells Vim that the user knows that the input and/or output is
423424
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}
425428

426429
*--ttyfail*
427430
--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.
508511
{not in Vi}
509512

510513
*--clean*
511-
--clean Equal to "-u DEFAULTS -i NONE":
514+
--clean Equal to "-u DEFAULTS -U NONE -i NONE":
512515
- initializations from files and environment variables is
513516
skipped
514517
- the |defaults.vim| script is loaded, which implies
515518
'nocompatible': use Vim defaults
519+
- no |gvimrc| script is loaded
516520
- no viminfo file is read or written
521+
- the home directory is excluded from 'runtimepath'
517522
*-x*
518523
-x Use encryption to read/write files. Will prompt for a key,
519524
which is then stored in the 'key' option. All writes will
@@ -873,6 +878,9 @@ accordingly. Vim proceeds in this order:
873878
(*) Using this file or environment variable will cause 'compatible' to be
874879
off by default. See |compatible-default|.
875880

881+
Note: When using the |mzscheme| interface, it is initialized after loading
882+
the vimrc file. Changing 'mzschemedll' later has no effect.
883+
876884
4. Load the plugin scripts. *load-plugins*
877885
This does the same as the command: >
878886
:runtime! plugin/**/*.vim
@@ -1005,14 +1013,13 @@ Vi compatible default value ~
10051013
When Vim starts, the 'compatible' option is on. This will be used when Vim
10061014
starts its initializations. But as soon as:
10071015
- 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
10091017
- the "VIMINIT" environment variable is set, or
10101018
- the "-N" command line argument is given, or
10111019
- the "--clean" command line argument is given, or
1012-
even when no vimrc file exists.
10131020
- 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'.
10161023

10171024
Note that this does NOT happen when a system-wide vimrc file was found.
10181025

@@ -1038,13 +1045,13 @@ giving the mapping.
10381045
Defaults without a .vimrc file ~
10391046
*defaults.vim*
10401047
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,
10421049
switch on syntax highlighting and a few more things. See the script for
10431050
details. NOTE: this is done since Vim 8.0, not in Vim 7.4. (it was added in
10441051
patch 7.4.2111 to be exact).
10451052

10461053
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: >
10481055
unlet! skip_defaults_vim
10491056
source $VIMRUNTIME/defaults.vim
10501057
Then Vim works like before you had a .vimrc. Copying $VIMRUNTIME/vimrc_example
@@ -1415,7 +1422,7 @@ The output of ":mkview" contains these items:
14151422
5. The scroll position and the cursor position in the file. Doesn't work very
14161423
well when there are closed folds.
14171424
6. The local current directory, if it is different from the global current
1418-
directory.
1425+
directory and 'viewoptions' contains "curdir".
14191426

14201427
Note that Views and Sessions are not perfect:
14211428
- They don't restore everything. For example, defined functions, autocommands
@@ -1527,7 +1534,7 @@ Notes for Unix:
15271534
you have worked with.
15281535
- If you want to share the viminfo file with other users (e.g. when you "su"
15291536
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
15311538
allow just anybody to read and write your viminfo file!
15321539
- Vim will not overwrite a viminfo file that is not writable by the current
15331540
"real" user. This helps for when you did "su" to become root, but your

0 commit comments

Comments
 (0)