sponsor Vim development Vim logo Vim Book Ad

ctags_cache : generate and cache tags for C language uses ctags

 script karma  Rating 14/9, Downloaded by 1337  Comments, bugs, improvements  Vim wiki

created by
lei fw
 
script type
ftplugin
 
description
project on github.com: https://github.com/abadcafe/ctags_cache

ctags_cache is a vim plugin which can generate tags for C language uses ctags, then cache the tags in memory.

Thus, you don't need any tags file!

The plugin will update the cache while you call the :w command. Moreover, the header files which include by you current editing file will send to ctags too. Because ctags parse local variables not very good, so the plugin do the works itself(use regular expression.), it can extract local variables and function arguments exactly.

It is excellent, isn't it? The story is not end, thanks to python, the plugin uses threads so you almost can not feel the delay caused by parsing files when you coding!

Command

:SetIncludeList path-of-include-dir1 path-of-include-dir2 ...

:SetIncludeList

the command with no arguments sets no Include dir, thus only header files in the dir of current file will be parsed.

Todo

The plugin is not test in windows, I guess it can work.
 
install details
Copy c_complete.vim c_complete.py ctags_cache/ to /.vim/plugin/.

You will need vim compiled with python 3.2.

there are two patches for ctags:

1. tags generated by Exuberant ctags has a field 'typeref', indicates the type of the tag. but if the type is a 'typedef', the field is empty. this patch fixed it.
http://sourceforge.net/tracker/download.php?group_id=6556&atid=306556&file_id=417098&aid=3354287

2. the anonymous struct indexed by Exuberant ctags named as '__anon1', it will confused when editing multi-files and updated one file. this patch use random number as anonymous id to avoid the problem.
http://sourceforge.net/tracker/download.php?group_id=6556&atid=106556&file_id=334521&aid=2819658
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
ctags_cache-v1.0.7.tar.gz v1.0.7 2012-03-10 7.3 lei fw improved:
1. initially support c++ class complete.
2. eliminate delay of open big file.

fixed:
fixed some minor bugs.
ip used for rating: 3.144.113.30

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github