Skip to content

Commit 5e62ac4

Browse files
committed
Update cmdline.{txt,jax}
1 parent 127cee1 commit 5e62ac4

File tree

2 files changed

+29
-18
lines changed

2 files changed

+29
-18
lines changed

doc/cmdline.jax

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -807,15 +807,16 @@ Note: これらは文字通りに打ち込まれる、これらは特別なキ
807807
|v:beval_text| のために使われる。
808808
<cfile> カーソル下のパス名に置き換えられる (|gf| が使うものと同様)
809809
<afile> 自動コマンドの実行時、操作されているバッファのファイル名ま
810-
たは読み書き用のファイル名に置き換えられる。
810+
たは読み書き用のファイル名に置き換えられる。 *E495*
811811
<abuf> 自動コマンドの実行時、カレントバッファの番号に置き換えられ
812812
る (":r file" と ":so file" のときにもカレントバッファの番
813813
号に置き換えられる。読み込まれているファイルはバッファ内に
814-
ない)
814+
ない) *E496*
815815
<amatch> 自動コマンドの実行時、この自動コマンドが実行されたときのマッ
816-
チに置き換えられる。そのファイル名がマッチの検索に使われて
817-
いないときのみ、<afile> と違う値になる (イベント FileType、
818-
Syntax、SpellFileMissing 用)。
816+
チに置き換えられる。 *E497*
817+
そのファイル名がマッチの検索に使われていないときのみ、
818+
<afile> と違う値になる (イベント FileType, Syntax,
819+
SpellFileMissing 用)。
819820
<sfile> コマンド ":source" の実行時、取り込まれたファイルのファイル
820821
名に置き換えられる。 *E498*
821822
関数の実行時はこのように置き換えられる:
@@ -826,6 +827,9 @@ Note: これらは文字通りに打ち込まれる、これらは特別なキ
826827
は無効になることに注意。
827828
<slnum> コマンド ":source" の実行時、行番号に置き換えられる。 *E842*
828829
関数の中では、関数の先頭からの相対的な行番号になる。
830+
<sflnum> スクリプトを実行すると、行番号に置き換えられる。<slnum>
831+
異なる点は、<sflnum> がどのような状況でもスクリプト行番号で
832+
置き換えられることである。 *E961*
829833

830834
*filename-modifiers*
831835
*:_%:* *::8* *::p* *::.* *::~* *::h* *::t* *::r* *::e* *::s* *::gs* *::S*
@@ -849,7 +853,8 @@ Note: これらは文字通りに打ち込まれる、これらは特別なキ
849853
イル名は修正されない。
850854
:. ファイル名をカレントディレクトリについて相対的な名前に (可能な
851855
らば) 切り詰める。ファイル名がカレントディレクトリの下になけれ
852-
ば、ファイル名は修正されない。
856+
ば、ファイル名は修正されない。しかし、MS-Windowsでは、カレント
857+
ドライブであればドライブ名は削除される。
853858
最も短く切り詰めるには ":~:." を使う。
854859
:h ファイル名のヘッド (末尾の部分と全ての区切りが除かれたもの)。
855860
:e, :r, :t には使えない。

en/cmdline.txt

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -832,11 +832,12 @@ it, no matter how many backslashes.
832832
\\# \#
833833
Also see |`=|.
834834

835-
*:<cword>* *:<cWORD>* *:<cfile>* *<cfile>*
836-
*:<sfile>* *<sfile>* *:<afile>* *<afile>*
837-
*:<abuf>* *<abuf>* *:<amatch>* *<amatch>*
838-
*:<cexpr>* *<cexpr>*
839-
*<slnum>* *E495* *E496* *E497* *E499* *E500*
835+
*:<cword>* *<cword>* *:<cWORD>* *<cWORD>*
836+
*:<cexpr>* *<cexpr>* *:<cfile>* *<cfile>*
837+
*:<afile>* *<afile>* *:<abuf>* *<abuf>*
838+
*:<amatch>* *<amatch>*
839+
*:<sfile>* *<sfile>* *:<slnum>* *<slnum>*
840+
*:<sflnum>* *<sflnum>* *E499* *E500*
840841
Note: these are typed literally, they are not special keys!
841842
<cword> is replaced with the word under the cursor (like |star|)
842843
<cWORD> is replaced with the WORD under the cursor (see |WORD|)
@@ -849,15 +850,16 @@ Note: these are typed literally, they are not special keys!
849850
|gf| uses)
850851
<afile> When executing autocommands, is replaced with the file name
851852
of the buffer being manipulated, or the file for a read or
852-
write.
853+
write. *E495*
853854
<abuf> When executing autocommands, is replaced with the currently
854855
effective buffer number (for ":r file" and ":so file" it is
855856
the current buffer, the file being read/sourced is not in a
856-
buffer).
857+
buffer). *E496*
857858
<amatch> When executing autocommands, is replaced with the match for
858-
which this autocommand was executed. It differs from
859-
<afile> only when the file name isn't used to match with
860-
(for FileType, Syntax and SpellFileMissing events).
859+
which this autocommand was executed. *E497*
860+
It differs from <afile> only when the file name isn't used
861+
to match with (for FileType, Syntax and SpellFileMissing
862+
events).
861863
<sfile> When executing a ":source" command, is replaced with the
862864
file name of the sourced file. *E498*
863865
When executing a function, is replaced with:
@@ -867,9 +869,12 @@ Note: these are typed literally, they are not special keys!
867869
Note that filename-modifiers are useless when <sfile> is
868870
used inside a function.
869871
<slnum> When executing a ":source" command, is replaced with the
870-
line number. *E842*
872+
line number. *E842*
871873
When executing a function it's the line number relative to
872874
the start of the function.
875+
<sflnum> When executing a script, is replaced with the line number.
876+
It differs from <slnum> in that <sflnum> is replaced with
877+
the script line number in any situation. *E961*
873878

874879
*filename-modifiers*
875880
*:_%:* *::8* *::p* *::.* *::~* *::h* *::t* *::r* *::e* *::s* *::gs* *::S*
@@ -894,7 +899,8 @@ These modifiers can be given, in this order:
894899
directory.
895900
:. Reduce file name to be relative to current directory, if
896901
possible. File name is unmodified if it is not below the
897-
current directory.
902+
current directory, but on MS-Windows the drive is removed if
903+
it is the current drive.
898904
For maximum shortness, use ":~:.".
899905
:h Head of the file name (the last component and any separators
900906
removed). Cannot be used with :e, :r or :t.

0 commit comments

Comments
 (0)