@@ -832,11 +832,12 @@ it, no matter how many backslashes.
832
832
\\# \#
833
833
Also see | `= | .
834
834
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*
840
841
Note: these are typed literally, they are not special keys!
841
842
<cword> is replaced with the word under the cursor (like | star | )
842
843
<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!
849
850
| gf | uses)
850
851
<afile> When executing autocommands, is replaced with the file name
851
852
of the buffer being manipulated, or the file for a read or
852
- write.
853
+ write. *E495*
853
854
<abuf> When executing autocommands, is replaced with the currently
854
855
effective buffer number (for ":r file" and ":so file" it is
855
856
the current buffer, the file being read/sourced is not in a
856
- buffer).
857
+ buffer). *E496*
857
858
<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).
861
863
<sfile> When executing a ":source" command, is replaced with the
862
864
file name of the sourced file. *E498*
863
865
When executing a function, is replaced with:
@@ -867,9 +869,12 @@ Note: these are typed literally, they are not special keys!
867
869
Note that filename-modifiers are useless when <sfile> is
868
870
used inside a function.
869
871
<slnum> When executing a ":source" command, is replaced with the
870
- line number. *E842*
872
+ line number. *E842*
871
873
When executing a function it's the line number relative to
872
874
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*
873
878
874
879
*filename-modifiers*
875
880
*:_%:* *::8* *::p* *::.* *::~* *::h* *::t* *::r* *::e* *::s* *::gs* *::S*
@@ -894,7 +899,8 @@ These modifiers can be given, in this order:
894
899
directory.
895
900
:. Reduce file name to be relative to current directory, if
896
901
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.
898
904
For maximum shortness, use ":~:.".
899
905
:h Head of the file name (the last component and any separators
900
906
removed). Cannot be used with :e, :r or :t.
0 commit comments