Wednesday, July 15, 2015

Re: how to get the function:line of calling script

Nikolay Pavlov wrote:
> 2015-07-15 18:01 GMT+03:00 Charles Campbell <Charles.E.Campbell@nasa.gov>:
>> Hello!
>>
>> Is there a way for a function to know from where it was called?
>> function:line, file:line, whatever (although if I had my preferences I'd
>> pick the latter).
> You can know from which function some function is called by using
> expand('<sfile>') (will show full stack). But this is without lines
> and without files. There is also `<slnum>` for the current line, but
> not caller's current line.
>
Thank you, Nikolay!

I'd forgotten about <slnum> and will look into using <sfile> for the stack.

Regards,
Chip Campbell

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: