Loading ...
Sorry, an error occurred while loading the content.

Re: autom. ctags run

Expand Messages
  • Ralf Schmitt
    ... Yeah! Thanks that s exactly what I was looking for. ... Ok so I ll need a path ctag command mapping somewhere? Nice! Can you provide more information
    Message 1 of 3 , Feb 28, 2007
      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:
      > > 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
      Yeah! Thanks that's exactly what I was looking for.

      > I've also written a plugin providing a
      > TagCurrentDirectoryTagGroupXX
      > which does run the given tag command from the registered directory
      > automatically.
      Ok so I'll need a path <-> ctag command mapping somewhere? Nice!
      Can you provide more information about it?

      > You can find a script installer here:
      > http://mawercer.de/marcweber/vim/vimlib/installers/vimlib_taghelper_installer_sourceme.vim
      Sorry, not sure what a "vim installer does" I always put everything as
      described to a subdir of .vim. This isn't the case for your installer?
      > 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')
      Yeah this would be absolutly great! I've got kde3/4 enabled projects,
      cpp enabled projects and qt3/4 enabled projects.
      So I do something like this:

      set tags+=~/.vim/tags/cpptags
      set tags+=~/.vim/tags/kde3tags
      "set tags+=~/.vim/tags/kde4tags
      set tags+=~/.vim/tags/qt3tags
      "set tags+=~/.vim/tags/qt4tags

      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!

      > If you're interested I'll assist you getting started as there may some lack of
      > documentation ;)

      Yes any help would be appreciated!

      Best regards

      > Marc
    Your message has been successfully submitted and would be delivered to recipients shortly.