Skip to content

Commit 74f329c

Browse files
authored
Merge pull request #1081 from tsuyoshicho/update/20220423/cmdline
Update cmdline.{txt,jax}
2 parents cbbcc82 + 980a4f3 commit 74f329c

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

doc/cmdline.jax

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*cmdline.txt* For Vim バージョン 8.2. Last change: 2022 Feb 04
1+
*cmdline.txt* For Vim バージョン 8.2. Last change: 2022 Apr 09
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -891,11 +891,11 @@ Note: これらは文字通りに打ち込まれる、これらは特別なキ
891891
る (イベント FileType, Syntax, SpellFileMissing 用)。
892892
ファイル名としてマッチした時、フルパスに展開される。
893893
*:<sfile>* *<sfile>*
894-
<sfile> コマンド ":source" の実行時、取り込まれたファイルのファイル
894+
<sfile> コマンド ":source" の実行時、読み込まれたファイルのファイル
895895
名に置き換えられる。 *E498*
896896
旧来の関数の実行時は、<stack> と同様にコールスタックに置き
897-
換えられる(これは後方互換性のためであり、<stack> を使うのが
898-
望しい)
897+
換えられる(これは後方互換性のためであり、<stack>
898+
<script> を使うのが望しい)
899899
Vim9 script では関数で <sfile> を使うとエラーとなる。*E1245*
900900
Note: スクリプト内で <sfile> が使われていない場合、ファイル
901901
名修飾子は無効になることに注意。
@@ -905,6 +905,11 @@ Note: これらは文字通りに打ち込まれる、これらは特別なキ
905905
プト行として、そして要素間は ".." が使われる。例:
906906
"function {関数名1}[{行番号}]..{関数名2}[{行番号}]"
907907
コールスタックがない場合は、*E489* エラーになる。
908+
*:<script>* *<script>*
909+
<script> コマンド `:source` の実行時、読み込まれたファイルのファイル
910+
名に置き換えられる。関数の実行時、定義のあるスクリプトのファ
911+
イル名に置き換えられる。
912+
ファイル名が決定できないときは *E1274* エラーになる。
908913
*:<slnum>* *<slnum>*
909914
<slnum> コマンド ":source" の実行時、行番号に置き換えられる。 *E842*
910915
関数の中では、関数の先頭からの相対的な行番号になる。

en/cmdline.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*cmdline.txt* For Vim version 8.2. Last change: 2022 Feb 04
1+
*cmdline.txt* For Vim version 8.2. Last change: 2022 Apr 09
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -939,7 +939,7 @@ Note: these are typed literally, they are not special keys!
939939
file name of the sourced file. *E498*
940940
When executing a legacy function, is replaced with the call
941941
stack, as with <stack> (this is for backwards
942-
compatibility, using <stack> is preferred).
942+
compatibility, using <stack> or <script> is preferred).
943943
In Vim9 script using <sfile> in a function gives error
944944
*E1245* .
945945
Note that filename-modifiers are useless when <sfile> is
@@ -951,6 +951,12 @@ Note: these are typed literally, they are not special keys!
951951
".." in between items. E.g.:
952952
"function {function-name1}[{lnum}]..{function-name2}[{lnum}]"
953953
If there is no call stack you get error *E489* .
954+
*:<script>* *<script>*
955+
<script> When executing a `:source` command, is replaced with the file
956+
name of the sourced file. When executing a function, is
957+
replaced with the file name of the script where it is
958+
defined.
959+
If the file name cannot be determined you get error *E1274* .
954960
*:<slnum>* *<slnum>*
955961
<slnum> When executing a ":source" command, is replaced with the
956962
line number. *E842*

0 commit comments

Comments
 (0)