Skip to content

Commit c3a88f2

Browse files
authored
Merge pull request #278 from mnishz/starting_for_Vim_8.1
Update starting from Vim 8.0 to 8.1
2 parents a5d1bf9 + 6f2f407 commit c3a88f2

File tree

2 files changed

+51
-35
lines changed

2 files changed

+51
-35
lines changed

doc/starting.jax

Lines changed: 29 additions & 20 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
@@ -53,13 +53,14 @@ filename 1つ以上のファイル名が与えられた場合。まずは最初
5353
ノーマルモードで起動する場合: >
5454
vim -
5555
ex -v -
56-
< 新しいバッファに、標準入力を読み込んで編集を始める。このコマン
57-
ドを使用するとまず標準入力を読み込み、それから標準エラー出力を
58-
読み込む。例: >
56+
< 新しいバッファに、標準入力を読み込んで編集を始める。コマンドは
57+
通常であれば標準入力から読み込まれるが、この場合代わりに標準エ
58+
ラー出力から読み込まれる。例: >
5959
find . -name "*.c" -print | vim -
60-
< バッファには未保存のテキストが含まれるので、「変更(modified)」
61-
のマークがつけられる。ただし読み込み専用モードで起動する場合は
62-
除く。例: >
60+
< {訳注: 以下の文はすべて "view -" に対する説明と思われる。}
61+
簡単に終了できるよう、バッファに「変更(modified)」のマークは付
62+
けられない。バッファの内容を思いがけず失いたくない場合は、変更
63+
とマークするよう気を付けること。例: >
6364
ls | view -
6465
<
6566
Exモードで起動する場合: >
@@ -124,7 +125,8 @@ UNIXでは通常、Vimという名前の実行可能ファイルが一つあり
124125
VMSでは全てのオプション引数は小文字であるとみなされる。大文字を指定するにはス
125126
ラッシュを前に置く。つまり "-R" でリカバリモード、"-/R" で読み込み専用となる。
126127

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

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

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

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

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

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

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

13891397
Note: ビューとセッションは完璧ではない:
@@ -1493,12 +1501,13 @@ Note: Unixにおける注意点:
14931501
- viminfoファイルには入力したテキストや、使用したコマンドが記載されているの
14941502
で、他人に覗かれないように保護(パーミッション設定)したほうが良い。
14951503
- 複数のユーザーでviminfoファイルを共有したい時(例えば他のユーザーへ "su" する
1496-
時など)には、グループもしくは全員にviminfoファイルへの書き込み権限を与える。
1497-
Vimが新しくviminfoファイルを保存するときに、その設定を維持する。しかし、誰に
1498-
でもviminfoファイルを読ませたり書かせたりすべきではないし、注意が必要。
1504+
時など)には、グループもしくは全員にviminfoファイルへの書き込み権限を与えるこ
1505+
とができる。Vimはそのviminfoファイルを置き換えるときに権限を維持する。しか
1506+
し、あなたのviminfoファイルを誰にでも読ませたり書かせたりしないように注意す
1507+
ること!
14991508
- 現在の "本当" のユーザーによって書き込み不能なviminfoファイルは、Vimは決して
15001509
上書きしない。これは "su" でrootユーザーになった時、しかし$HOMEがまだ通常ユー
1501-
ザーのホームディレクトリのままの時の支援となる。そうでないとVimはroot所有の、
1510+
ザーのホームディレクトリのままの時の助けとなる。そうでないとVimはroot所有の、
15021511
他の誰にも読めないviminfoファイルを作成してしまう。
15031512
- viminfo ファイルはシンボリックリンクであってはならない。セキュリティ上の問題
15041513
を避けるためである。

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)