- Modify invalid pattern:
currently expand('<sfile>') returns
string like "function g:func1..<SNR>12_func2"
- Add link to |:<sfile>|.
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.
diff -r c2098c3095e7 runtime/doc/eval.txt
--- a/runtime/doc/eval.txt Sat Mar 08 18:38:28 2014 +0100
+++ b/runtime/doc/eval.txt Mon Mar 10 17:06:56 2014 +0700
@@ -2815,7 +2815,8 @@
<afile> autocmd file name
<abuf> autocmd buffer number (as a String!)
<amatch> autocmd matched name
- <sfile> sourced script file name
+ <sfile> sourced script file name or
+ name of executing function |:<sfile>|
<slnum> sourced script file line number
<cword> word under the cursor
<cWORD> WORD under the cursor
diff -r c2098c3095e7 runtime/doc/map.txt
--- a/runtime/doc/map.txt Sat Mar 08 18:38:28 2014 +0100
+++ b/runtime/doc/map.txt Mon Mar 10 17:06:56 2014 +0700
@@ -1105,7 +1105,7 @@
If you need to get the script number to use in a complicated script, you can
use this function: >
function s:SID()
- return matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze_SID$')
+ return matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze_')
endfun
The "<SNR>" will be shown when listing functions and mappings. This is useful