OmniTags : This plugin can help you to maintenance tags file.
script karma |
Rating 19/10,
Downloaded by 1104 |
Comments, bugs, improvements
|
Vim wiki
|
created by |
lei fw |
|
script type |
utility |
|
description |
SEE MY NEW PLUGIN: vimscript #3684, it is more powerful for c programmer!
12 " This plugin can help you to maintenance tags file.
13 "
14 " There are 3 commands:
15 "
16 " 1. :OmniTagsLoad /path/to/tags-file
17 "
18 " Load the tags-file and generate a list of source files indexed by
19 " tags-file.
20 "
21 " If tags-file doesn't exist, it can create a null file automaticlly.
22 "
23 " Once tags-file are loaded, every buffer-write event will trigger a
24 " re-index operation on current file if current file exists in tags-file.
25 "
26 " The re-index operation will do:
27 " a) delete tags of current file from tags-file.
28 " b) call "ctags -a" command add the tags of current file to tags-file.
29 "
30 " Therefor, your tags-file will always updated.
31 "
32 " Don't mind the speed of re-index operation, it is indetectable while
33 " the tags-file size small than 20MiB.
34 "
35 " 2. :OmniTagsUpdate {file1} {file2} ...
36 "
37 " Update the tags-file loaded before, you can specify many files and use
38 " wildcards(see ":h wildcards"), "wildignore" option(see "h: wildignore")
39 " also influences the result of wildcards parsing.
40 "
41 " If files are not in tags yet, the plugin will add those files to tags,
42 " if files already exists, the plugin will update them.
43 "
44 " You can specify no files, for re-index all files that already indexed.
45 "
46 " 3. :OmniTagsUnload
47 "
48 " Just an oppsite of :OmniTagsLoad, usually needs not be called by human. |
|
install details |
Just drop the script to ~/.vim/plugin.
I added a map to .vimrc "nmap <silent> <leader>t <ESC>:OmniTagsLoad tags<CR>" to load tags-file in current dir.
The plugin depends on unix commands below:
ctags, grep, tail, cut, sort
Common linux distribution installed them normally, you can find windows version of them at http://ctags.sf.net/ and http://gnuwin32.sf.net/ (windows version are not test yet, I guess it will work).
BTW: There is a problem in ctags, see http://sourceforge.net/tracker/?func=detail&aid=2819658&group_id=6556&atid=106556. It will buggy when you using OmniTags and write many files. Use this patch to resolve that. |
|
script versions (upload new version)
Click on the package to download.
ip used for rating: 3.142.196.27
|