28 Aug, 2009, JohnnyStarr wrote in the 1st comment:
Votes: 0
I've been using omni complete with ctags for the intellisense-ish feature in Vim.
I also have been using the STL tags db, but it only works with files that have the .cpp extension.
I suppose I can just change everything from .c to .cpp? Is there a command perhaps that I can use
while creating the tags to avoid having to do this?
04 Sep, 2009, David Haley wrote in the 2nd comment:
Votes: 0
What exactly is it that only works with .cpp files? That's probably OmniCppComplete only being turned on when it thinks it's relevant. There's probably a command you can add to vim's filetype handler; if you poke around in the .vim directory, and find where OmniCppComplete is turned on for C++ filetype, you can do the same for normal C. I don't remember where it is exactly; .vim/after/ftplugin.vim? Something like that. But first, is that indeed the problem? I'm thinking this has nothing to do with the tag file itself, but with the plugin.
04 Sep, 2009, JohnnyStarr wrote in the 3rd comment:
Votes: 0
Yes, that is the issue.
Not that big of a deal, buy annoying. :rolleyes:
I'll have to check that out. BTW, where's all the mudmeet photos?
04 Sep, 2009, David Haley wrote in the 4th comment:
Votes: 0
Look at .vim/after/ftplugin/cpp.vim
That turns on OmniCppComplete for cpp files. You can probably just copy that to c.vim, but I'm not exactly sure what will happen.

The only mudmeet photo AFAIK is the one with Davion holding his boot of beer, which was posted to the mudmeet thread. :smile:
04 Sep, 2009, quixadhal wrote in the 5th comment:
Votes: 0
You might also be able to add lines like this to your own code:

/* vim:set ft=C++: */

I do that for LPC, since it also insists on being ".c" extension.
04 Sep, 2009, JohnnyStarr wrote in the 6th comment:
Votes: 0
quixadhal said:
You might also be able to add lines like this to your own code:
/* vim:set ft=C++: */

By code do you mean the .vimrc file or my source code? If its the source, are you saying to comment it out and
the tags will detect this?
05 Sep, 2009, quixadhal wrote in the 7th comment:
Votes: 0
At the top of your source files. I haven't actually tried C++, but I use lpc for lpc code, and it gets the ([ ]) syntax correctly.
05 Sep, 2009, David Haley wrote in the 8th comment:
Votes: 0
What Quix is describing is something that you can put in files to tell vim how to handle it on a per-file basis. You can do things like set the filetype, indentation, etc. The approach where you edit ftplugin makes it global. If you truly want all .c files to work with OmniCppComplete, you probably want to make it turn on the plugin when a .c file is opened.
05 Sep, 2009, JohnnyStarr wrote in the 9th comment:
Votes: 0
Wow, thats pretty nifty :cool:
0.0/9