Re: autom. ctags run
- On Tue Feb 27, 2007 at 23:09 +0100, Marc Weber wrote:
> On Tue, Feb 27, 2007 at 07:04:13PM +0100, Ralf Schmitt wrote:Yeah! Thanks that's exactly what I was looking for.
> > Hi list
> > For now I've mapped the ctags command described in OmniCompletion
> > plugin on a key to refresh project tags file.
> > But very often I forget to update (press the hotkey) before I enter the
> > omni completion. So it came to my mind to trigger ctag update run when
> > I save (:w) a header file.
> > - Does this make sense?
> Yes it does. To generate tags you need the file beeing on disk (as long
> as you aren't using a vim script to generate those tags .. which would
> be slow ;)
> > - any hint how I could add a function to :w for a special file type?
> This is all done using autocommands.
> Just register a BufWritePost command like this
> (written of my head without testing)
> augroup GenerateTags
> autocmd BufRead,BufNewFile *.c *.cpp *.h call MyFuncToGenerateTags
> " using only a specia filetype:
> autocmd BufRead,BufNewFile * if &ft="c" | do something | endif
> augroup end
> I've also written a plugin providing aOk so I'll need a path <-> ctag command mapping somewhere? Nice!
> which does run the given tag command from the registered directory
Can you provide more information about it?
>Sorry, not sure what a "vim installer does" I always put everything as
> You can find a script installer here:
described to a subdir of .vim. This isn't the case for your installer?
>Yeah this would be absolutly great! I've got kde3/4 enabled projects,
> Its easy to manage adding tags of different libraries.
> It looks like this:
> call vl#lib#tags#taghelper#AddTagsToBufferTagList('c_lib_1')
> call vl#lib#tags#taghelper#AddTagsToBufferTagList('c_lib')
cpp enabled projects and qt3/4 enabled projects.
So I do something like this:
in my .vimrc. I'll have to comment/uncomment it to my needs everytime I change
the project. Having a project config file for this would speed up things a lot!
>Yes any help would be appreciated!
> If you're interested I'll assist you getting started as there may some lack of
> documentation ;)