Re: Use and meaning of plug

2011-07-24 Thread ZyX
Reply to message «Re: Use and meaning of plug», sent 08:08:49 24 July 2011, Sunday by Tony Mechelynck: The whole SID thing is meant to allow creating mappings and functions which are only visible from within the script where they were created (i.e., not in other scripts, not at the

Re: Folding on Markdown headers

2011-07-24 Thread Vlad Irnov
On Jul 23, 12:56 pm, Eric Weir eew...@bellsouth.net wrote: I have folding on markdown headers set up courtesy of Vlad Irnov's markdown folding script. Recently I've encountered something that strikes me as an anomaly. I've reread most of the help on folding and am not finding anything

Re: Use and meaning of plug

2011-07-24 Thread Tony Mechelynck
On 24/07/11 09:41, ZyX wrote: Reply to message «Re: Use and meaning ofplug», sent 08:08:49 24 July 2011, Sunday by Tony Mechelynck: The wholeSID thing is meant to allow creating mappings and functions which are only visible from within the script where they were created (i.e., not in other

Re: detecting first and last line of the current paragraph

2011-07-24 Thread Jose Caballero
On Jul 23, 2011, at 18:00, Tim Chase v...@tim.thechases.com wrote: On 07/23/2011 12:59 PM, Jose Caballero wrote: 2011/7/23 Ben Schmidtmail_ben_schm...@yahoo.com.au You don't need to apologies for bothering us. If we didn't enjoy helping people with Vim, we wouldn't be on this mailing

why is call needed in vimscript?

2011-07-24 Thread Jose Caballero
Hi, I was trying to write a small function in vimscript that moves the cursor to a given line, in order to perform some actions. I was trying with something like this function F() cursor(4,0) endfunction but I got and E492 error. However, with call cursor(4,0)

Re: why is call needed in vimscript?

2011-07-24 Thread Jose Caballero
2011/7/24 Taylor Hedberg tmhedb...@gmail.com :call is always needed in order to call a function if the function call is not otherwise wrapped in some ex command. In other words, it's never valid to have a bare function call by itself on a line. OK. I need to digest that. I think I should

Re: why is call needed in vimscript?

2011-07-24 Thread Tim Chase
On 07/24/2011 06:03 PM, Jose Caballero wrote: 2011/7/24 Taylor Hedbergtmhedb...@gmail.com :call is always needed in order to call a function if the function call is not otherwise wrapped in some ex command I need to digest that. I think I should start learning once and for all what is exactly

Re: why is call needed in vimscript?

2011-07-24 Thread Tony Mechelynck
On 25/07/11 00:33, Jose Caballero wrote: Hi, I was trying to write a small function in vimscript that moves the cursor to a given line, in order to perform some actions. I was trying with something like this function F() cursor(4,0) endfunction but I got and E492

Re: detecting first and last line of the current paragraph

2011-07-24 Thread Jose Caballero
1.- to protect it from crashing when I use vim 6.x I guess there has to be something similar to the python sys.version or sys.version_info variables. :help v:version I already found v:version on the web. I am embedding the whole function into a if v:version 700 endif

Re: why is call needed in vimscript?

2011-07-24 Thread Jose Caballero
cursor(4,0) is the _value_ of the function. For instance, in a Vim compiled with +float, acos(-1) is the arc-cosine (in radians) of minus one, i.e., the number pi. All functions return a value (if you execute a :return statement without an explicit return value, the function returns the

Re: why is call needed in vimscript?

2011-07-24 Thread Tony Mechelynck
On 25/07/11 02:54, Jose Caballero wrote: [...] I understand it better now. Thanks for the comments. By the way, I think I was searching the wrong thing. :help :call is clear, you are right, but what I tried was :help call and I got a little bit puzzled. My fault. Thanks all of you for your

Re: why is call needed in vimscript?

2011-07-24 Thread Jose Caballero
I don't know what you get for :help call :help call call({func}, {arglist} [, {dict}]) *call()* *E699* Call function {func} with the items in |List| {arglist} as arguments. {func} can either be a |Funcref| or the name of a

Re: why is call needed in vimscript?

2011-07-24 Thread Tony Mechelynck
On 25/07/11 03:41, Jose Caballero wrote: I don't know what you get for :help call :help call call({func}, {arglist} [, {dict}]) *call()* *E699* Call function {func} with the items in |List| {arglist} as arguments.

Re: why is call needed in vimscript?

2011-07-24 Thread Tim Chase
On 07/24/2011 09:34 PM, Tony Mechelynck wrote: On 25/07/11 03:41, Jose Caballero wrote: I don't know what you get for :help call Hm, strange. Is this hitting the difference between these two? :help call :help :call -tim -- You received this message from the vim_use maillist. Do

Re: why is call needed in vimscript?

2011-07-24 Thread Jose Caballero
On Jul 24, 2011, at 22:42, Tim Chase v...@tim.thechases.com wrote: On 07/24/2011 09:34 PM, Tony Mechelynck wrote: On 25/07/11 03:41, Jose Caballero wrote: I don't know what you get for :help call Hm, strange. Is this hitting the difference between these two? :help call

Re: why is call needed in vimscript?

2011-07-24 Thread Benjamin R. Haskell
On Sun, 24 Jul 2011, Tim Chase wrote: On 07/24/2011 09:34 PM, Tony Mechelynck wrote: On 25/07/11 03:41, Jose Caballero wrote: I don't know what you get for :help call Hm, strange. Is this hitting the difference between these two? :help call :help :call It sounds like it. But,