Re: textobjects extension

2010-05-13 Fir de Conversatie mobi phil
/*  * Version of strchr() and strrchr() that handle unsigned char strings  * with characters from 128 to 255 correctly.  It also doesn't return a  * pointer to the NUL at the end of the string.  */    char_u  * vim_strchr(string, c)    char_u      *string;    int         c; {    char_u  

Re: textobjects extension

2010-05-13 Fir de Conversatie Tony Mechelynck
On 13/05/10 11:54, mobi phil wrote: /* * Version of strchr() and strrchr() that handle unsigned char strings * with characters from 128 to 255 correctly. It also doesn't return a * pointer to the NUL at the end of the string. */ char_u * vim_strchr(string, c) char_u

Re: textobjects extension

2010-05-12 Fir de Conversatie Tony Mechelynck
On 15/03/10 10:39, mobi phil wrote: I think what Antony wanted to say is: What do you understand by 'a function'? How can it be identified in text? IMHO a function is such a highly language-dependent construct that a definition for a corresponding text object can not be easily described by a

Re: textobjects extension

2010-03-15 Fir de Conversatie Jürgen Krämer
Hi, [quoting re-ordered, please bottom-post mobi phil wrote: On Sun, Mar 14, 2010 at 6:26 PM, Antony Scriven adscri...@gmail.com wrote: On 14 March 2010 13:53, mobi phil m...@mobiphil.com wrote: I think it would make enough sense to extend the textobjects with af that would select a

Re: textobjects extension

2010-03-15 Fir de Conversatie mobi phil
I think what Antony wanted to say is: What do you understand by 'a function'? How can it be identified in text? IMHO a function is such a highly language-dependent construct that a definition for a corresponding text object can not be easily described by a single flag or even some parameters

Re: textobjects extension

2010-03-15 Fir de Conversatie Kana Natsuno
On Sun, 14 Mar 2010 22:53:57 +0900, mobi phil m...@mobiphil.com wrote: I think it would make enough sense to extend the textobjects with af that would select a function, that is its name, formal parameters and the body. One could write a script for it, I know, but the same time hundreds of

Re: textobjects extension

2010-03-15 Fir de Conversatie Ben Fritz
On Mar 15, 4:39 am, mobi phil m...@mobiphil.com wrote: Sorry... Indeed Antony wrote define. It seems that I wanted so much not to read that write a function :) Vim is and was primarily c and c++ programmers editor, and lots of features are tuned for c. My a function text object for C

Re: textobjects extension

2010-03-15 Fir de Conversatie Ben Fritz
On Mar 15, 8:56 am, Ben Fritz fritzophre...@gmail.com wrote: My a function text object for C code: [[vaB ...which of course will only work if your coding style places '{' at the beginning of a new line, and could more easily be written [[v% in most cases. I must need some more coffee this

Re: textobjects extension

2010-03-15 Fir de Conversatie mobi phil
thanks, * both examples are rather obvious, but they do not select the functions header. * Ben: in what you proposed, [[ jumps to the wrong position if { is not in the first colum, so both [[%v and [[aB do the job only if { is in the first position * this tells me that [[ is less useful in most

Re: textobjects extension

2010-03-15 Fir de Conversatie mobi phil
That sounds good... will try out. Maybe adding what I was mentioning in my prev email, would make sense ( select class, struct, while/if/switch blocks together with their header) -- rgrds, mobi phil being mobile, but including technology http://mobiphil.com -- You received this message from

textobjects extension

2010-03-14 Fir de Conversatie mobi phil
Hello, I think it would make enough sense to extend the textobjects with af that would select a function, that is its name, formal parameters and the body. One could write a script for it, I know, but the same time hundreds of mappings should be defined (d, v, y etc. etc.). I think all

Re: textobjects extension

2010-03-14 Fir de Conversatie Antony Scriven
On 14 March 2010 13:53, mobi phil m...@mobiphil.com wrote: I think it would make enough sense to extend the textobjects with af that would select a function, [...] Define 'a function'. --Antony -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below

Re: textobjects extension

2010-03-14 Fir de Conversatie mobi phil
Thank you Antony, however I forgot to say, ... no need to answer write a function etc..., as I know about that :) was wondering if other vim users would find sthg. like that usefull, and, if smbd. would know about such a script... On Sun, Mar 14, 2010 at 6:26 PM, Antony Scriven