[PATCH] add new vimscript function getsid()

2011-10-01 Thread tyru
Hi list. Vimscript does not have the easy way to get current script ID. so :help recommends that add s:SID() and use it. but it is a little bit hacky thing. so I want to add new vimscript function getsid(). Attached patch added the function and its help. Could you include this patch? -- You re

Re: [PATCH] add new vimscript function getsid()

2011-10-03 Thread Yasuhiro MATSUMOTO
It prefer to return zero for invalid cases. let sid getsid() if sid " using sid endif On Sun, Oct 2, 2011 at 1:52 PM, tyru wrote: > Hi list. > > Vimscript does not have the easy way to get current script ID. > so :help recommends that add s:SID() and use it. > but it is a little bit hacky thi

Re: [PATCH] add new vimscript function getsid()

2011-10-03 Thread tyru
Thanks for the review. I updated the patch. On Tue, Oct 4, 2011 at 4:19 AM, Yasuhiro MATSUMOTO wrote: > It prefer to return zero for invalid cases. > > let sid getsid() > if sid >  " using sid > endif > > On Sun, Oct 2, 2011 at 1:52 PM, tyru wrote: >> Hi list. >> >> Vimscript does not have the e

Re: [PATCH] add new vimscript function getsid()

2011-10-05 Thread Yukihiro Nakadaira
I don't know if it is useful, anyway. Vim has expand('') and expand(''). So perhaps expand('') is more preferable? -- Yukihiro Nakadaira - yukihiro.nakada...@gmail.com -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to.

Re: [PATCH] add new vimscript function getsid()

2011-10-05 Thread mattn
+1 to yukihiro nakadaira. -- 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