On Tue, Jul 21, 2009 at 5:37 AM, Tinou wrote: > >> I'm trying to make my vim highlight all defined type from a C++ >> project tag file. >> >> I found this function: >> >> >> function! s:highlight() let list = taglist('.*') >> for item in list >> let kind = item.kind >> if kind == 'f' || kind == 'c' >> let name = item.name >> exec 'syntax keyword Identifier '.name >> endif >> endfor >> endfunction >> >> >> It does exactly what I want but is horribly slow :-( >> >> I tried :echo taglist('.*') which is what takes most time (the project >> tree is quite big). But doing :echo taglist('TYPE.*') returns almost >> immediately. I didn't manage to make the function (which I only partly >> understand) work with it. > > Hello again, > > I've read the doc (as I should have done in the first place) and > discovered the argument passed to taglist() is a regexp of tags to be > found. > > What I still don't understand in the function is the item.kind. Where is > this documented ?
At :help taglist() taglist({expr}) *taglist()* Returns a list of tags matching the regular expression {expr}. Each list item is a dictionary with at least the following entries: .... kind Type of the tag. The value for this entry depends on the language specific kind values. Only available when using a tags file generated by Exuberant ctags or hdrtag. If you mean "what does it do in C/C++", you'd have to consult the ctags docs, I'd imagine. ~Matt --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---