showing C declarations

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

showing C declarations

malahal
Is there any vim plugin that shows a function declaration if I type the
function name? For example, if I type "memset(" it should show the
memset function declaration (at least its type of arguments).

Thanks, Malahal.
Reply | Threaded
Open this post in threaded view
|

Re: showing C declarations

Kyku-2
[hidden email] wrote:
> Is there any vim plugin that shows a function declaration if I type the
> function name? For example, if I type "memset(" it should show the
> memset function declaration (at least its type of arguments).
>
> Thanks, Malahal.
>
>
>  
Hello, as is Vim doesn't seem to support call-tips help. Frankly
speaking I miss it too. You might want too look at :help
CursorHold-example for some workaround. Or maybe there's script for
doing something like this (doesn't seem to be hard to do).
Reply | Threaded
Open this post in threaded view
|

Re: showing C declarations

iler.ml
[hidden email] wrote:
> > Is there any vim plugin that shows a function declaration if I type the
> > function name? For example, if I type "memset(" it should show the
> > memset function declaration (at least its type of arguments).

I think K command is the closest vim thing to what you ask:
It opens manpage for memset if your cursor is on 'memset('
and you press K.

    :help K

I know it works in linux/unix/cygwin.l I'm not sure it works in
Windows, though.

Yakov
Reply | Threaded
Open this post in threaded view
|

Re: showing C declarations

malahal
I know the 'K' thing. It only works if there is a man page. Also, you
need to go to normal mode from insert mode (C-O will help a little).
More over, I like it show any function declaration from my own header
files. I really want a file type plugin/script that does this.

Thank you for your responses.

Thanks, Malahal.

Yakov Lerner [[hidden email]] wrote:

> [hidden email] wrote:
> > > Is there any vim plugin that shows a function declaration if I type the
> > > function name? For example, if I type "memset(" it should show the
> > > memset function declaration (at least its type of arguments).
>
> I think K command is the closest vim thing to what you ask:
> It opens manpage for memset if your cursor is on 'memset('
> and you press K.
>
>     :help K
>
> I know it works in linux/unix/cygwin.l I'm not sure it works in
> Windows, though.
>
> Yakov
Reply | Threaded
Open this post in threaded view
|

Re: showing C declarations

Charles E Campbell Jr
In reply to this post by malahal
[hidden email] wrote:

>Is there any vim plugin that shows a function declaration if I type the
>function name? For example, if I type "memset(" it should show the
>memset function declaration (at least its type of arguments).
>  
>

There's the hints file created by flist.  See
http://mysite.verizon.net/astronaut/src/index.html ;
to use it

flist -h *.c

which will create a "hints" file from the C source.  You'll need to
source hints in.  It then will
trigger on   funcname(   and produce a message showing a prototype.

Regards,
Chip Campbell

Reply | Threaded
Open this post in threaded view
|

Vimdiff

vim-2
In reply to this post by malahal
When I'm opening a file and then going into File->Split diff with and
choose another file, I get the following error:

E97: Cannot create diffs

Version used:
Version gVim 7.0f beta
MS-Windows 32 bit GUI version

Regards,
Laurent
Reply | Threaded
Open this post in threaded view
|

Re: Vimdiff

Benji Fisher
On Thu, Apr 27, 2006 at 12:30:27AM +0200, vim wrote:
> When I'm opening a file and then going into File->Split diff with and
> choose another file, I get the following error:
>
> E97: Cannot create diffs
>
> Version used:
> Version gVim 7.0f beta
> MS-Windows 32 bit GUI version

     There are a few suggestions under

:help E97

HTH --Benji Fisher
Reply | Threaded
Open this post in threaded view
|

Re: Vimdiff

Roy Fulbright
Make sure you have a "diff" program located somewhere in your path on MSWin.
That's what caused the error for me when I first installed Vim and tried to
run vimdiff.

Regards,
Roy Fulbright


>From: Benji Fisher <[hidden email]>
>To: [hidden email]
>Subject: Re: Vimdiff
>Date: Thu, 27 Apr 2006 08:54:58 -0400
>
>On Thu, Apr 27, 2006 at 12:30:27AM +0200, vim wrote:
> > When I'm opening a file and then going into File->Split diff with and
> > choose another file, I get the following error:
> >
> > E97: Cannot create diffs
> >
> > Version used:
> > Version gVim 7.0f beta
> > MS-Windows 32 bit GUI version
>
>      There are a few suggestions under
>
>:help E97
>
>HTH --Benji Fisher


Reply | Threaded
Open this post in threaded view
|

Re: Vimdiff

vim-2
In reply to this post by Benji Fisher
Alright, got it.  The path wasn't correct in my _vimrc file.

Stupid me for not looking further into this myself.  Ah well, sometimes
you work so hard that you can't think proprely anymore and that extra
little effort you should put into solving a problem is just not there.

Thanks Roy and Benji,
Laurent


Roy Fulbright wrote:
> Make sure you have a "diff" program located somewhere in your path on
> MSWin. That's what caused the error for me when I first installed Vim
> and tried to run vimdiff.
>
> Regards,
> Roy Fulbright

Benji Fisher wrote:

> On Thu, Apr 27, 2006 at 12:30:27AM +0200, vim wrote:
>  
>> When I'm opening a file and then going into File->Split diff with and
>> choose another file, I get the following error:
>>
>> E97: Cannot create diffs
>>
>> Version used:
>> Version gVim 7.0f beta
>> MS-Windows 32 bit GUI version
>>    
>
>      There are a few suggestions under
>
> :help E97
>
> HTH --Benji Fisher
>
>